dgs.utils.config.fill_in_defaults¶
- dgs.utils.config.fill_in_defaults(config: dict[str, any], default_cfg: dict[str, any], copy: bool = True) dict[str, any] [source]¶
Use values of a given configuration or the default configuration, to fill in missing values of the current configuration.
For the current configuration, all existing key-value pairs will stay the same. Additionally, keys only present in the default configuration will be added to the current configuration.
- Parameters:
config – Current configuration as nested dict
default_cfg – Default configuration as nested dict
copy – Whether to copy
default_cgf
before updating. Default True.
- Returns:
The combined configuration.