espnet3.contract.stages.list_roles
Less than 1 minute
espnet3.contract.stages.list_roles
espnet3.contract.stages.list_roles(system_cls: type) → tuple[str, ...]
Return system_cls’s config roles, in stage order, without duplicates.
Derived from each declared stage’s StageSpec.config - there is no separate, fixed role list to keep in sync with what a system actually declares.
Examples
>>> class ExampleSystem:
... stages = (
... StageSpec(name="train", config="training"),
... StageSpec(name="infer", config="inference"),
... StageSpec(name="measure", config="inference"),
... )
>>> list_roles(ExampleSystem)
('training', 'inference')