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 model data from wandb.

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

Download pre-trained Decima model weights from wandb.

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:

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

Returns:

Path to the downloaded directory containing the model weights and metadata.

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

Download pre-trained Decima model data from wandb.

Parameters:
  • download_dir (str) – Directory to download the metadata.

  • metadata (str) – Name of the model to download metadata for using wandb.

Returns:

Path to the downloaded metadata.

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

Download pre-trained Decima model weights from wandb.

Parameters:
  • model_name – Model name or replicate number.

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

Returns:

Path to the downloaded model weights.

Module contents

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

Load the Decima metadata from wandb.

Parameters:

name_or_path (Optional[str]) – Path to local metadata file or name of the model to load metadata for using wandb. If None, default model’s metadata will be downloaded from wandb.

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 wandb or local path.

Parameters:
  • model (Union[str, int, List[str]]) – Model identifier or path. Can be: - int: Replicate number (0-3) - str: Model name on wandb - 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.

decima.hub.login_wandb()[source]

Login to wandb either as anonymous or as a user.