{"record":{"id":"eb4280414674cfa7","repo":"sgl-project/sglang","slug":"tasks-must-contain-canonical-task-names-got-task","errorCode":null,"errorMessage":"tasks must contain canonical task names, got {task!r}","messagePattern":"tasks must contain canonical task names, got (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/release_metadata.py","lineNumber":103,"sourceCode":"        try:\n            video_sigma = float(scales[\"video\"])\n            audio_sigma = float(scales[\"audio\"])\n        except (KeyError, TypeError, ValueError) as exc:\n            raise ValueError(\n                \"model_index.json._minimax_h3.sigma_shift_scales requires numeric \"\n                \"video and audio values\"\n            ) from exc\n        metadata = cls(\n            schema_version=1,\n            partition=partition,\n            tasks=tasks,\n            task_aliases=dict(aliases),\n            video_sigma_shift=video_sigma,\n            audio_sigma_shift=audio_sigma,\n        )\n        for task in metadata.tasks:\n            if canonical_minimax_h3_task(task) != task:\n                raise ValueError(\n                    f\"tasks must contain canonical task names, got {task!r}\"\n                )\n            if partition_for_task(task) != partition:\n                raise ValueError(\n                    f\"task {task!r} does not belong to partition {partition!r}\"\n                )\n        for alias, target in metadata.task_aliases.items():\n            if target not in metadata.tasks:\n                raise ValueError(\n                    f\"task alias {alias!r} targets undeclared task {target!r}\"\n                )\n            if canonical_minimax_h3_task(alias) != target:\n                raise ValueError(\n                    f\"unsupported task alias mapping {alias!r} -> {target!r}\"\n                )\n        return metadata\n\n    @property","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/release_metadata.py#L85-L121","documentation":"Every task listed in the release metadata must already be in canonical form: canonical_minimax_h3_task(task) must be a fixed point. If a task is an alias or unknown spelling (canonicalization would change it), from_model_index rejects it — tasks must be canonical names, aliases belong in task_aliases.","triggerScenarios":"Declaring tasks: [\"t2v\"] in _minimax_h3 metadata where the canonical name is e.g. \"text_to_video\", so canonical_minimax_h3_task(\"t2v\") != \"t2v\".","commonSituations":"Copy-pasting shorthand/alias names into the tasks list instead of canonical names, or mixing alias and canonical vocabularies when authoring the index.","solutions":["Replace each entry in tasks with its canonical task name from canonical_minimax_h3_task","Move shorthand spellings into task_aliases mapping them to the canonical task","Regenerate metadata from the canonical task table instead of hand-writing it"],"exampleFix":"// before\n\"tasks\": [\"t2v\"]\n// after\n\"tasks\": [\"text_to_video\"], \"task_aliases\": {\"t2v\": \"text_to_video\"}","handlingStrategy":"validation","validationCode":"from sglang... import canonical_minimax_h3_task\nassert all(canonical_minimax_h3_task(t) == t for t in tasks), \"non-canonical task in tasks\"","typeGuard":"def all_canonical(tasks: list[str]) -> bool:\n    return all(canonical_minimax_h3_task(t) == t for t in tasks)","tryCatchPattern":null,"preventionTips":["Keep one canonical task table as the single source of truth","Put shorthand names only in task_aliases"],"tags":["minimax-h3","task-names","canonicalization","model-index"],"backgroundTag":"schema-validation-failed","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}