Settings¶
-
class
catalyst.settings.Settings(cv_required: bool = False, albumentations_required: Optional[bool] = None, kornia_required: Optional[bool] = None, segmentation_models_required: Optional[bool] = None, use_libjpeg_turbo: bool = False, log_required: bool = False, alchemy_required: Optional[bool] = None, neptune_required: Optional[bool] = None, wandb_required: Optional[bool] = None, plotly_required: Optional[bool] = None, ml_required: bool = False, ipython_required: Optional[bool] = None, matplotlib_required: Optional[bool] = None, scipy_required: Optional[bool] = None, pandas_required: Optional[bool] = None, sklearn_required: Optional[bool] = None, git_required: Optional[bool] = None, nlp_required: bool = False, transformers_required: Optional[bool] = None, tune_required: bool = False, optuna_required: Optional[bool] = None, nmslib_required: Optional[bool] = False, use_lz4: bool = False, use_pyarrow: bool = False, telegram_logger_token: Optional[str] = None, telegram_logger_chat_id: Optional[str] = None, hydra_required: Optional[bool] = False)[source]¶ Bases:
catalyst.tools.frozen_class.FrozenClassCatalyst settings.
-
class
catalyst.settings.ConfigFileFinder(program_name: str)[source]¶ Bases:
objectEncapsulate the logic for finding and reading config files.
Adapted from:
https://gitlab.com/pwoolvett/flake8 (MIT License)
https://github.com/python/mypy (MIT License)
-
__init__(program_name: str) → None[source]¶ Initialize object to find config files.
- Parameters
program_name – Name of the current program (e.g., catalyst).
-
generate_possible_local_files()[source]¶ Find and generate all local config files.
- Yields
str – Path to config file.
-
class
catalyst.settings.MergedConfigParser(config_finder: catalyst.settings.ConfigFileFinder)[source]¶ Bases:
objectEncapsulate merging different types of configuration files.
This parses out the options registered that were specified in the configuration files, handles extra configuration files, and returns dictionaries with the parsed values.
Adapted from:
https://gitlab.com/pwoolvett/flake8 (MIT License)
https://github.com/python/mypy (MIT License)
-
GETBOOL_ACTIONS= {'store_false', 'store_true'}¶ Set of actions that should use the
getbool()method.
-
__init__(config_finder: catalyst.settings.ConfigFileFinder)[source]¶ Initialize the MergedConfigParser instance.
- Parameters
config_finder – Initialized ConfigFileFinder.
-
parse() → dict[source]¶ Parse and return the local and user config files.
First this copies over the parsed local configuration and then iterates over the options in the user configuration and sets them if they were not set by the local configuration file.
- Returns
Dictionary of the parsed and merged configuration options.
- Return type
dict