espnet3.contract.stages.resolve_config_roles
Less than 1 minute
espnet3.contract.stages.resolve_config_roles
espnet3.contract.stages.resolve_config_roles(config: str | tuple[str, ...]) → tuple[str, ...]
Normalize a StageSpec.config value to a tuple of roles.
A bare string is treated as a single-role tuple; a tuple is returned as-is. Does not validate the roles themselves - see _validate_config_roles() for that.
Examples
>>> resolve_config_roles("training")
('training',)
>>> resolve_config_roles(("training", "publication"))
('training', 'publication')