espnet3.utils.run_utils.resolve_loaded_configs
Less than 1 minute
espnet3.utils.run_utils.resolve_loaded_configs
espnet3.utils.run_utils.resolve_loaded_configs(configs: Mapping[str, DictConfig]) → None
Resolve each config in configs in place, naming its key on failure.
Runner entry points load configs with resolve=False so the inherited, merged config can be assembled from several stages’ top-level keys before any ${…} interpolation is evaluated; this is the final resolution step, once that assembly is done.
- Parameters:configs (Mapping *[*str , DictConfig ]) – Mapping from a name - a stage name, in this codebase - to its loaded, not-yet-resolved config.
- Returns: Each config is resolved in place.
- Return type: None
- Raises:ConfigError – An interpolation in one of the configs cannot be resolved; the message names the mapping key and the original error.
Examples
>>> from omegaconf import OmegaConf
>>> configs = {
... "train": OmegaConf.create(
... {"exp_tag": "t", "exp_dir": "./exp/${exp_tag}"}
... )
... }
>>> resolve_loaded_configs(configs)
>>> configs["train"].exp_dir
'./exp/t'