Configuration (mtb.config)¶
The paths and settings every function reads. mtb.config holds them: set
one, such as mtb.config.data_path = "/scratch/data", to use your own data
folder, environment folder or Leiden backend.
| Name | Summary |
|---|---|
mtb.config |
The paths and settings every multibench function reads. |
Environment variables¶
| variable | effect |
|---|---|
MULTIBENCH_DATA_PATH |
The folder that holds the dataset folders (data_path). |
MULTIBENCH_ENVS_DIR |
Where method environments are installed and looked up (envs_dir). |
MULTIBENCH_REPO_PATH |
Where the method scripts are, or are downloaded to on first use (repo_path). |
MULTIBENCH_SCRIPTS_REF |
A commit or tag of PYangLab/scMultiBench whose method scripts are fetched with git instead of the package's. |
MULTIBENCH_RUN_MODE |
prefix or conda: how a run enters an environment. Environments describes both. |
A value assigned in Python wins over the variable. print(mtb.config)
prints each setting.
mtb.config
¶
The paths and settings every multibench function reads.
mtb.config is one of these: set a field to change it, for example
mtb.config.data_path = "/scratch/data", or set
MULTIBENCH_DATA_PATH, MULTIBENCH_REPO_PATH and
MULTIBENCH_ENVS_DIR in the shell. A value assigned in Python wins
over the variable; None goes back to the default.
print(mtb.config) shows every field; a misspelt field raises
AttributeError.
| ATTRIBUTES | DESCRIPTION |
|---|---|
data_path |
Data root that holds the dataset folders;
type
|
repo_path |
Folder of the method scripts (
type
|
envs_dir |
Where the method environments live (
type
|
leiden_flavor |
Leiden backend of the clustering in
type
|
Examples
>>> import multibench as mtb
>>> mtb.config.data_path = "/scratch/data"
>>> # before mtb.env.install(...)
>>> mtb.config.envs_dir = "/scratch/envs"
>>> print(mtb.config)
See Also
mtb.env.install : installs the method envs under envs_dir.
mtb.data.fetch : downloads demo datasets into data_path.