ml.core.config
Defines the base config and object classes.
The base configuration dataclass provides some small increments over what
OmegaConf expects. The :func:conf_field function exists to standardize
the metadata that each field should have.
- ml.core.config.conf_field(value: Any, *, help: str | None = None, short: str | None = None) Any[source]
Gets a field for a given value.
- Parameters:
value – The default value for the current field
help – An optional metadata field, which may be parsed to a command line argument in some CLIs
short – An optional metadata field, which may be parsed to a command line argument in some CLIs
- Returns:
The correctly constructed dataclass field
- class ml.core.config.BaseConfig(name: str = '???')[source]
Bases:
objectDefines the base class for all configs.
- name: str = '???'
- classmethod get_defaults() dict[str, BaseConfigT][source]
Returns default configurations.
- Returns:
A dictionary of default configurations for the current config