mlair.configuration
¶
Collection of configuration functions, paths and classes.
Submodules¶
Package Contents¶
Functions¶
|
Set up host path. |
|
Set name of experiment and its path. |
|
Set path for bootstrap input data. |
|
Check a given path and create if not existing. |
|
|
|
Set name of experiment and its path. |
Attributes¶
-
mlair.configuration.
ROOT_PATH
¶
-
mlair.configuration.
prepare_host
(create_new=True, data_path=None) → str¶ Set up host path.
INFO: This functions is designed to handle known hosts. For proper working, please add your hostname hardcoded here. Otherwise parse your custom data_path in kwargs. If data_path is provided, hardcoded paths for known hosts will be ignored!
- Parameters
create_new – Create new path if enabled
data_path – Parse your custom path (and therefore ignore preset paths fitting to known hosts)
- Returns
full path to data
-
mlair.configuration.
set_experiment_name
(name: str = None, sampling: Union[str, tuple] = None) → str¶ Set name of experiment and its path.
- Experiment name is set to TestExperiment if not provided. If a name is given, this string is expanded
by suffix _network. Experiment name is always expanded by _<sampling> as ending suffix if sampling is given.
- Parameters
name – custom experiment name
sampling – sampling rate as string to add to experiment name
- Returns
experiment name
-
mlair.configuration.
set_bootstrap_path
(bootstrap_path: str, data_path: str) → str¶ Set path for bootstrap input data.
Either use given bootstrap_path or create additional folder in same directory like data path.
- Parameters
bootstrap_path – custom path to store bootstrap data
data_path – path of data for default bootstrap path
- Returns
full bootstrap path
-
mlair.configuration.
check_path_and_create
(path: str, remove_existing: bool = False) → None¶ Check a given path and create if not existing.
- Parameters
path – path to check and create
remove_existing – if set to true an existing folder is removed and replaced by a new one (default False).
-
mlair.configuration.
get_host
()¶
-
mlair.configuration.
set_experiment_path
(name: str, path: str = None) → str¶ Set name of experiment and its path.
Experiment path is set to <experiment_path>/<exp_name> if provided or ROOT_PATH/<exp_name> otherwise
- Parameters
name – custom experiment name
path – custom experiment path
- Returns
full experiment path