{"record":{"id":"8cf2fa123c352722","repo":"sgl-project/sglang","slug":"module-s-requested-for-update-not-found-in-pipeli","errorCode":null,"errorMessage":"Module(s) requested for update not found in pipeline: {unknown}. Available Module(s): {list(components.keys())}","messagePattern":"Module\\(s\\) requested for update not found in pipeline: (.+?)\\. Available Module\\(s\\): (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/post_training/weights_updater.py","lineNumber":439,"sourceCode":"        logger.info(message)\n        return success, message\n\n    def _collect_modules(\n        self, target_modules: list[str] | None\n    ) -> list[tuple[str, torch.nn.Module]]:\n        \"\"\"Resolve target_modules to (name, module) pairs.\n\n        Raises:\n            ValueError: If target_modules contains names not found in the pipeline.\n        \"\"\"\n        components = get_updatable_modules(self.pipeline)\n\n        if target_modules is None:\n            names = list(components.keys())\n        else:\n            unknown = [n for n in target_modules if n not in components]\n            if unknown:\n                raise ValueError(\n                    f\"Module(s) requested for update not found in pipeline: {unknown}. \"\n                    f\"Available Module(s): {list(components.keys())}\"\n                )\n            names = target_modules\n\n        return [(name, components[name]) for name in names]\n\n    def _apply_weights(\n        self,\n        modules_to_update: list[tuple[str, torch.nn.Module]],\n        weights_map: dict[str, str],\n    ) -> tuple[bool, str]:\n        \"\"\"Load weights into each module; rollback on first failure.\"\"\"\n        updated_modules: list[str] = []\n\n        for module_name, module in modules_to_update:\n            try:\n                weights_iter = _get_weights_iter(weights_map[module_name])","sourceCodeStart":421,"sourceCodeEnd":457,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/post_training/weights_updater.py#L421-L457","documentation":"Raised by WeightsUpdater._collect_modules when the list of target_modules passed to a weight-update API contains names that are not modules of the loaded pipeline. The error lists both the unknown names and the modules actually available, so it is purely a name-mismatch validation error.","triggerScenarios":"Calling update_weights_from_disk / update_weights_from_tensor / _update_lora_from_tensor with target_modules=['foo'] where 'foo' is not a key in the pipeline components dict (e.g. typo, or using a module name from a different model/pipeline variant).","commonSituations":"Model architecture changed between versions so module names differ; copying module names from another checkpoint; stale hardcoded module list; extra whitespace/case mismatch in names.","solutions":["Use a module name from the 'Available Module(s)' list printed in the message","Pass target_modules=None to update all modules","Print the components keys first to discover valid names before calling"],"exampleFix":"// before\nupdater.update_weights_from_tensor(named_tensors=t, target_modules=[\"vision_tower\"])\n// after\nupdater.update_weights_from_tensor(named_tensors=t, target_modules=None)  # or a name from available modules","handlingStrategy":"validation","validationCode":"valid = set(updater.list_modules()) if hasattr(updater,'list_modules') else None\n# or derive from the error's Available list; check before calling\nassert all(m in known for m in target_modules), f\"unknown modules {set(target_modules)-known}\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Discover available module names once at startup and validate target lists against them","Avoid hardcoded module names; derive them from the pipeline components"],"tags":["weights-update","module-name","validation","multimodal"],"backgroundTag":"invalid-module-name","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}