{"record":{"id":"7530fe60a73ae700","repo":"fishaudio/fish-speech","slug":"specify-tags-before-launching-a-multirun","errorCode":null,"errorMessage":"Specify tags before launching a multirun!","messagePattern":"Specify tags before launching a multirun!","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"fish_speech/utils/rich_utils.py","lineNumber":87,"sourceCode":"\n        branch.add(rich.syntax.Syntax(branch_content, \"yaml\"))\n\n    # print config tree\n    rich.print(tree)\n\n    # save config tree to file\n    if save_to_file:\n        with open(Path(cfg.paths.output_dir, \"config_tree.log\"), \"w\") as file:\n            rich.print(tree, file=file)\n\n\n@rank_zero_only\ndef enforce_tags(cfg: DictConfig, save_to_file: bool = False) -> None:\n    \"\"\"Prompts user to input tags from command line if no tags are provided in config.\"\"\"  # noqa: E501\n\n    if not cfg.get(\"tags\"):\n        if \"id\" in HydraConfig().cfg.hydra.job:\n            raise ValueError(\"Specify tags before launching a multirun!\")\n\n        log.warning(\"No tags provided in config. Prompting user to input tags...\")\n        tags = Prompt.ask(\"Enter a list of comma separated tags\", default=\"dev\")\n        tags = [t.strip() for t in tags.split(\",\") if t != \"\"]\n\n        with open_dict(cfg):\n            cfg.tags = tags\n\n        log.info(f\"Tags: {cfg.tags}\")\n\n    if save_to_file:\n        with open(Path(cfg.paths.output_dir, \"tags.log\"), \"w\") as file:\n            rich.print(cfg.tags, file=file)\n","sourceCodeStart":69,"sourceCodeEnd":101,"githubUrl":"https://github.com/fishaudio/fish-speech/blob/befe4001745417f8c42131739d862b8a6fdbd15a/fish_speech/utils/rich_utils.py#L69-L101","documentation":"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.","triggerScenarios":"Running a hydra multirun (e.g. `python train.py -m ...`) without a `tags` key in the config or on the command line.","commonSituations":"Starting hyperparameter sweeps from a copied config whose tags were stripped; CI launches without tags.","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"],"exampleFix":"# before\npython train.py -m trainer.max_epochs=1,2\n# after\npython train.py -m trainer.max_epochs=1,2 tags=sweep-a","handlingStrategy":"validation","validationCode":"if OmegaConf.is_dict(cfg) and not cfg.get(\"tags\"):\n    cfg.tags = [\"dev\"]  # prevent interactive prompt / multirun abort","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set tags in config defaults","Add tags=[...] to sweep launcher commands"],"tags":["hydra","multirun","experiment-tracking"],"backgroundTag":"missing-config-value","analyzedSha":"befe4001745417f8c42131739d862b8a6fdbd15a","analyzedAt":"2026-08-27T21:31:45.703Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}