espnet3.utils.stage_configs.load_baked
Less than 1 minute
espnet3.utils.stage_configs.load_baked
espnet3.utils.stage_configs.load_baked(exp_dir: Path, stage: str) → DictConfig
Read <exp_dir>/config/<stage>.yaml.
- Parameters:
- exp_dir – The experiment directory stage was (expected to be) run under.
- stage – The stage whose baked config to read.
- Returns: The config stage ran with, as it was baked - its own top-level keys only, already resolved.
- Return type: DictConfig
- Raises:ConfigError – No <stage>.yaml exists under exp_dir; the message names stage and the path that was checked.
Examples
>>> import tempfile
>>> from omegaconf import OmegaConf
>>> with tempfile.TemporaryDirectory() as exp_dir:
... resolved = OmegaConf.create({"seed": 1})
... path = bake(Path(exp_dir), "train", resolved, ["seed"])
... load_baked(Path(exp_dir), "train")
{'seed': 1}