{"record":{"id":"ff5d061dc322af99","repo":"sgl-project/sglang","slug":"task-task-r-does-not-belong-to-partition-partit","errorCode":null,"errorMessage":"task {task!r} does not belong to partition {partition!r}","messagePattern":"task (.+?) does not belong to partition (.+?)","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":107,"sourceCode":"            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\n    def sigma_shift_scales(self) -> dict[str, float]:\n        return {\"video\": self.video_sigma_shift, \"audio\": self.audio_sigma_shift}\n\n    def canonical_task(self, task: str) -> str:","sourceCodeStart":89,"sourceCodeEnd":125,"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#L89-L125","documentation":"Each declared task must belong to the partition this metadata describes: partition_for_task(task) must equal the metadata's partition. Mixing tasks from another weight partition into this metadata block raises this error at load time.","triggerScenarios":"A model_index.json for partition \"a\" that lists a task whose partition_for_task resolves to \"b\", e.g. an audio task inside a video-partition metadata block.","commonSituations":"Merging metadata blocks when combining checkpoints, or copying the tasks list from a different partition's index during model packaging.","solutions":["Check partition_for_task for each listed task and remove tasks that resolve to a different partition","Confirm the partition field of this metadata block matches the checkpoint actually being loaded","Split the tasks into the correct per-partition model_index.json files"],"exampleFix":"// before\n{\"partition\": \"video\", \"tasks\": [\"text_to_video\", \"text_to_audio\"]}\n// after\n{\"partition\": \"video\", \"tasks\": [\"text_to_video\"]}","handlingStrategy":"validation","validationCode":"assert all(partition_for_task(t) == partition for t in tasks), \"task belongs to another partition\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Generate per-partition indexes from partition_for_task","Never merge tasks lists across checkpoints"],"tags":["minimax-h3","partition","task-routing","model-index"],"backgroundTag":"schema-validation-failed","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}