fishaudio/fish-speech · error · ValueError
Specify tags before launching a multirun!
Error message
Specify tags before launching a multirun!
What it means
enforce_tags runs in the train entrypoint; in Hydra multirun mode (sweep) interactive prompting is not possible, so if cfg.tags is empty it raises ValueError demanding tags be set before launching.
Source
Thrown at fish_speech/utils/rich_utils.py:87
branch.add(rich.syntax.Syntax(branch_content, "yaml"))
# print config tree
rich.print(tree)
# save config tree to file
if save_to_file:
with open(Path(cfg.paths.output_dir, "config_tree.log"), "w") as file:
rich.print(tree, file=file)
@rank_zero_only
def enforce_tags(cfg: DictConfig, save_to_file: bool = False) -> None:
"""Prompts user to input tags from command line if no tags are provided in config.""" # noqa: E501
if not cfg.get("tags"):
if "id" in HydraConfig().cfg.hydra.job:
raise ValueError("Specify tags before launching a multirun!")
log.warning("No tags provided in config. Prompting user to input tags...")
tags = Prompt.ask("Enter a list of comma separated tags", default="dev")
tags = [t.strip() for t in tags.split(",") if t != ""]
with open_dict(cfg):
cfg.tags = tags
log.info(f"Tags: {cfg.tags}")
if save_to_file:
with open(Path(cfg.paths.output_dir, "tags.log"), "w") as file:
rich.print(cfg.tags, file=file)
View on GitHub (pinned to befe400174)
Solutions
- Add tags to the command: `... tags=[experiment-x]`
- Set tags in configs/train.yaml or your custom config
- For sweeps, always define tags in the sweep config file
Example fix
# before python train.py -m trainer.max_epochs=1,2 # after python train.py -m trainer.max_epochs=1,2 tags=sweep-a
Defensive patterns
Strategy: validation
Validate before calling
if OmegaConf.is_dict(cfg) and not cfg.get("tags"):
cfg.tags = ["dev"] # prevent interactive prompt / multirun abort Prevention
- Always set tags in config defaults
- Add tags=[...] to sweep launcher commands
When it happens
Trigger: Running a hydra multirun (e.g. `python train.py -m ...`) without a `tags` key in the config or on the command line.
Common situations: Starting hyperparameter sweeps from a copied config whose tags were stripped; CI launches without tags.
Related errors
- Callbacks config must be a DictConfig!
- Logger config must be a DictConfig!
- Metric value not found! <metric_name={metric_name}>\nMake su
AI-assisted analysis of fishaudio/fish-speech@befe400174 (2026-08-27).
Data as JSON: /api/errors/7530fe60a73ae700.
Report an issue: GitHub.