napistu_torch.load.gcs

Module for loading pathway representations from GCS.

This module provides utilities for downloading Napistu models from Google Cloud Storage and initializing NapistuDataStore objects.

Public Functions

gcs_model_to_store(napistu_data_dir, store_dir, asset_name=GCS_ASSETS_NAMES.HUMAN_CONSENSUS, asset_version=None, overwrite_data_dir=False, overwrite_store_dir=False)

Download a model from GCS and save it to a local directory to initialize a NapistuDataStore.

Functions

gcs_model_to_store(napistu_data_dir, store_dir)

Download a model from GCS and save it to a local directory to initialize a NapistuDataStore.

napistu_torch.load.gcs.gcs_model_to_store(napistu_data_dir: str, store_dir: str, asset_name: str = 'human_consensus', asset_version: str | None = None, overwrite_data_dir: bool = False, overwrite_store_dir: bool = False) NapistuDataStore

Download a model from GCS and save it to a local directory to initialize a NapistuDataStore.

Parameters:
  • store_dir (str) – The directory to save the model to

  • asset_name (str) – The name of the asset to download (default: GCS_ASSETS_NAMES.HUMAN_CONSENSUS)

  • asset_version (Optional[str]) – The version of the asset to download (default: None, for the latest version)

  • overwrite_data_dir (bool) – Whether to overwrite the existing napistu_data_dir

  • overwrite_store_dir (bool) – Whether to overwrite the existing store_dir

Returns:

The NapistuDataStore object

Return type:

NapistuDataStore