settings

Functions

_get_optional_value(is_required, ...)

_is_auto_available()

_is_classification_available()

_is_prophet_available()

_is_statsforecast_available()

_is_torch_available()

_is_wandb_available()

_module_available(module_path)

Check if a path is available in your environment.

Classes

ConfigFileFinder(program_name)

Encapsulate the logic for finding and reading config files.

MergedConfigParser(config_finder)

Encapsulate merging different types of configuration files.

Settings([torch_required, prophet_required, ...])

etna settings.

class ConfigFileFinder(program_name: str)[source]

Encapsulate the logic for finding and reading config files.

Adapted from:

Initialize object to find config files.

Parameters

program_name (str) – Name of the current program (e.g., catalyst).

Return type

None

generate_possible_local_files()[source]

Find and generate all local config files.

Yields

str – Path to config file.

local_config_files() List[str][source]

Find all local config files which actually exist.

Returns

List of files that exist that are local project config files with extra config files appended to that list (which also exist).

Return type

List[str]

local_configs()[source]

Parse all local config files into one config object.

user_config()[source]

Parse the user config file into a config object.

class MergedConfigParser(config_finder: etna.settings.ConfigFileFinder)[source]

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:

Initialize the MergedConfigParser instance.

Parameters

config_finder (etna.settings.ConfigFileFinder) – 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

GETBOOL_ACTIONS = {'store_false', 'store_true'}

Set of actions that should use the getbool() method.

class Settings(torch_required: Optional[bool] = None, prophet_required: Optional[bool] = None, wandb_required: Optional[bool] = None, classification_required: Optional[bool] = None, auto_required: Optional[bool] = None, statsforecast_required: Optional[bool] = None)[source]

etna settings.

Parameters
  • torch_required (Optional[bool]) –

  • prophet_required (Optional[bool]) –

  • wandb_required (Optional[bool]) –

  • classification_required (Optional[bool]) –

  • auto_required (Optional[bool]) –

  • statsforecast_required (Optional[bool]) –

static parse() etna.settings.Settings[source]

Parse and return the settings.

Returns

Dictionary of the parsed and merged Settings.

Return type

Settings

type_hint(key: str)[source]

Return type hint for the specified key.

Parameters

key (str) – key of interest

Return type

type hint for the specified key