decima.hub package

Submodules

decima.hub.download module

decima.hub.download.cache_decima_data()[source]

Download all required data for Decima.

decima.hub.download.cache_decima_metadata()[source]

Download pre-trained Decima metadata from HuggingFace.

decima.hub.download.cache_decima_weights()[source]

Download pre-trained Decima model weights from HuggingFace.

decima.hub.download.cache_hg38()[source]

Download hg38 genome from UCSC.

decima.hub.download.download_decima(model='ensemble', download_dir='.')[source]

Download all required data for Decima.

Parameters:
  • model (str) – Model name or replicate number.

  • download_dir (str) – Directory to save the model weights and metadata.

Returns:

Path to the download directory.

decima.hub.download.download_decima_metadata(download_dir='.')[source]

Download pre-trained Decima metadata from HuggingFace to a local directory.

Parameters:

download_dir (str) – Directory to save the metadata.

Returns:

Path to the downloaded metadata.

decima.hub.download.download_decima_weights(model='ensemble', download_dir='.')[source]

Download pre-trained Decima model weights from HuggingFace to a local directory.

Parameters:
  • model (Union[str, int]) – Model name or replicate number.

  • download_dir (str) – Directory to save the model weights.

Returns:

Path to the downloaded model weights.

decima.hub.wandb module

Wandb-based model loading for internal/private model access.

decima.hub.wandb.cache_decima_data(host=None)[source]

Download all required Decima assets from wandb.

decima.hub.wandb.download_decima_metadata(metadata='ensemble', download_dir='.', host=None)[source]

Download pre-trained Decima metadata from wandb.

decima.hub.wandb.download_decima_weights(model='ensemble', download_dir='.', host=None)[source]

Download pre-trained Decima model weights from wandb.

decima.hub.wandb.load_decima_metadata(name_or_path=None, host=None)[source]

Load the Decima metadata from wandb or a local path.

decima.hub.wandb.load_decima_model(model='ensemble', device=None, host=None)[source]

Load a pre-trained Decima model from wandb or a local path.

decima.hub.wandb.login_wandb(host=None)[source]

Login to wandb either as anonymous or as a user.

Module contents

decima.hub.load_decima_metadata(name_or_path=None)[source]

Load the Decima metadata from HuggingFace or a local path.

Parameters:

name_or_path (Optional[str]) – Path to local metadata file or model name. If None, downloads from HuggingFace.

Returns:

An AnnData object containing the Decima metadata.

decima.hub.load_decima_model(model='ensemble', device=None)[source]

Load a pre-trained Decima model from HuggingFace or a local path.

Parameters:
  • model (Union[str, int, List[str]]) – Model identifier or path. Can be: - int: Replicate number (0-3) - str: Model name from MODEL_METADATA - str: Path to local model checkpoint - List: list of local model checkpoints

  • device (Optional[str]) – Device to load the model on. If None, automatically selects the best available device.

Returns:

A pre-trained Decima model instance loaded on the specified device.

Return type:

LightningModel

Raises:

ValueError – If model identifier is invalid or not found.