espnet3.systems.launch.build_parser
Less than 1 minute
espnet3.systems.launch.build_parser
espnet3.systems.launch.build_parser(system_cls: type) → ArgumentParser
Build the CLI parser for system_cls: stages and per-role configs.
- Parameters:system_cls – The system class whose declared stages set the
--stageschoices. - Returns: A parser with
--stages, one--<role>_configperroles()ofsystem_cls,--dry_run, and--write_requirements.
Examples
>>> from espnet3.systems.esp2_asr.system import ASRSystem
>>> parser = build_parser(ASRSystem)
>>> args = parser.parse_args(["--stages", "train"])
>>> args.stages
['train']