i6_core.rasr.config
¶
- class i6_core.rasr.config.ConfigBuilder(defaults)¶
- class i6_core.rasr.config.RasrConfig(prolog='', prolog_hash='', epilog='', epilog_hash='')¶
Used to store a Rasr configuration
- Parameters:
prolog (string) – A string that should be pasted as code at the beginning of the config file
epilog (string) – A string that should be pasted as code at the end of the config file
prolog_hash (string) – sets a specific hash for the prolog
epilog_hash (string) – sets a specific hash for the epilog
- html()¶
- class i6_core.rasr.config.StringWrapper(string, hidden=None)¶
Deprecated, please use e.g. DelayedFormat directly from Sisyphus Example for wrapping commands:
command = DelayedFormat(“{} -a -l en -no-escape”, tokenizer_binary)
Example for wrapping/combining paths:
pymod_config = DelayedFormat(“epoch:{},action:forward,configfile:{}”, model.epoch, model.returnn_config_file)
Example for wrapping even function calls:
- def cut_ending(path):
return path[: -len(“.meta”)]
- def foo():
[…] config.loader.saved_model_file = DelayedFunction(returnn_model.model, cut_ending)
- Parameters:
string (str) – some string based on the hashing object
hidden (Any) – hashing object
- class i6_core.rasr.config.WriteRasrConfigJob(*args, **kwargs)¶
Write a RasrConfig object into a .config file
- Parameters:
config (RasrConfig) – RASR config part that is hashed
post_config (RasrConfig) – RASR config part that is not hashed
- classmethod hash(kwargs)¶
- Parameters:
parsed_args (dict[str]) –
- Returns:
hash for job given the arguments
- Return type:
str
- run()¶
- tasks()¶
- Returns:
yields Task’s
- Return type:
list[sisyphus.task.Task]
- i6_core.rasr.config.build_config_from_mapping(crp, mapping, include_log_config=True, parallelize=False)¶
- Parameters:
crp (rasr.crp.CommonRasrParameters) –
mapping (dict[str,str|list[str]]) –
include_log_config (bool) –
parallelize (bool) –
- Returns:
config, post_config
- Return type: