Module mimir.utils

utils.py This module provides utility functions.

Environment Variables: MIMIR_CACHE_PATH: The path to the cache directory. This should be set in the environment. MIMIR_DATA_SOURCE: The data source for the MIMIR project. This should be set in the environment.

Functions

def fix_seed(seed: int = 0)

Fix seed for reproducibility.

Parameters

seed (int): The seed to set. Default is 0.

def get_cache_path()

Get path to cache directory.

Returns

str
path to cache directory

Raises

ValueError
If the MIMIR_CACHE_PATH environment variable is not set.
def get_data_source()

Get path to data source directory.

Returns

str
path to data source directory

Raises

ValueError
If the MIMIR_DATA_SOURCE environment variable is not set.