espnet3.utils.config_utils.set_corpus_and_system
espnet3.utils.config_utils.set_corpus_and_system
espnet3.utils.config_utils.set_corpus_and_system(value: str) → str
Passthrough for ${set_corpus_and_system:} after load-time rewriting.
This resolver is used as ${set_corpus_and_system:} in YAML configs. _normalize_relative_resolver_paths rewrites it to ${set_corpus_and_system:<corpus>_<system>} (e.g. ${set_corpus_and_system:mini_an4_asr}) by extracting the corpus and system names from the egs3/<corpus>/<system>/ portion of the config file path. The resolver itself simply returns that injected value.
If OmegaConf ever resolves this expression before the rewrite has run (which should not happen in normal usage), it raises RuntimeError with a clear message.
- Parameters:value (str) – The
<corpus>_<system>string injected at load time. - Returns: The injected value unchanged.
- Return type: str
- Raises:RuntimeError – If called with an empty string, meaning the rewrite did not run before OmegaConf resolution.
Examples
In egs3/mini_an4/asr/conf/publication.yaml:
upload_model: : hf_repo: espnet/${set_corpus_and_system:}_$
After loading via load_and_merge_config, resolves to:
espnet/mini_an4_asr_<exp_tag>