:py:mod:`mlair.configuration.path_config` ========================================= .. py:module:: mlair.configuration.path_config .. autoapi-nested-parse:: Functions related to path and os name setting. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: mlair.configuration.path_config.prepare_host mlair.configuration.path_config.set_experiment_path mlair.configuration.path_config.set_experiment_name mlair.configuration.path_config.set_bootstrap_path mlair.configuration.path_config.check_path_and_create mlair.configuration.path_config.get_host Attributes ~~~~~~~~~~ .. autoapisummary:: mlair.configuration.path_config.ROOT_PATH .. py:data:: ROOT_PATH .. py:function:: 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! :param create_new: Create new path if enabled :param data_path: Parse your custom path (and therefore ignore preset paths fitting to known hosts) :return: full path to data .. py:function:: set_experiment_path(name: str, path: str = None) -> str Set name of experiment and its path. * Experiment path is set to `/` if provided or `ROOT_PATH/` otherwise :param name: custom experiment name :param path: custom experiment path :return: full experiment path .. py:function:: 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 `_` as ending suffix if sampling is given. :param name: custom experiment name :param sampling: sampling rate as string to add to experiment name :return: experiment name .. py:function:: 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. :param bootstrap_path: custom path to store bootstrap data :param data_path: path of data for default bootstrap path :return: full bootstrap path .. py:function:: check_path_and_create(path: str, remove_existing: bool = False) -> None Check a given path and create if not existing. :param path: path to check and create :param remove_existing: if set to true an existing folder is removed and replaced by a new one (default False). .. py:function:: get_host()