Settings¶
-
class
catalyst.settings.
Settings
(contrib_required: bool = False, cv_required: bool = False, ml_required: bool = False, nlp_required: bool = False, alchemy_logger_required: Optional[bool] = None, neptune_logger_required: Optional[bool] = None, visdom_logger_required: Optional[bool] = None, wandb_logger_required: Optional[bool] = None, optuna_required: Optional[bool] = None, plotly_required: Optional[bool] = None, telegram_logger_token: Optional[str] = None, telegram_logger_chat_id: Optional[str] = None, use_lz4: bool = False, use_pyarrow: bool = False, albumentations_required: Optional[bool] = None, kornia_required: Optional[bool] = None, segmentation_models_required: Optional[bool] = None, use_libjpeg_turbo: bool = False, nmslib_required: Optional[bool] = None, transformers_required: Optional[bool] = None)[source]¶ Bases:
catalyst.tools.frozen_class.FrozenClass
Catalyst settings.
-
class
catalyst.settings.
ConfigFileFinder
(program_name: str)[source]¶ Bases:
object
Encapsulate 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:
object
Encapsulate 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