{"record":{"id":"1077ffcc7f3c9ddc","repo":"sgl-project/sglang","slug":"model-architectures-architectures-failed-to-be-i","errorCode":null,"errorMessage":"Model architectures {architectures} failed to be inspected. Please check the logs for more details.","messagePattern":"Model architectures (.+?) failed to be inspected\\. Please check the logs for more details\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/models/registry.py","lineNumber":347,"sourceCode":"        if isinstance(model_cls, str):\n            split_str = model_cls.split(\":\")\n            if len(split_str) != 2:\n                msg = \"Expected a string in the format `<module>:<class>`\"\n                raise ValueError(msg)\n\n            model = _LazyRegisteredModel(\n                module_name=split_str[0], class_name=split_str[1]\n            )\n        else:\n            model = _RegisteredModel.from_model_cls(model_cls)\n\n        self.registered_models[model_arch] = model\n\n    def _raise_for_unsupported(self, architectures: list[str]) -> NoReturn:\n        all_supported_archs = self.get_supported_archs()\n\n        if any(arch in all_supported_archs for arch in architectures):\n            raise ValueError(\n                f\"Model architectures {architectures} failed \"\n                \"to be inspected. Please check the logs for more details.\"\n            )\n\n        raise ValueError(\n            f\"Model architectures {architectures} are not supported for now. \"\n            f\"Supported architectures: {all_supported_archs}\"\n        )\n\n    def _try_load_model_cls(self, model_arch: str) -> type[nn.Module] | None:\n        if model_arch not in self.registered_models:\n            return None\n\n        return _try_load_model_cls(model_arch, self.registered_models[model_arch])\n\n    def _try_inspect_model_cls(self, model_arch: str) -> _ModelInfo | None:\n        if model_arch not in self.registered_models:\n            return None","sourceCodeStart":329,"sourceCodeEnd":365,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/models/registry.py#L329-L365","documentation":"Raised by _raise_for_unsupported when at least one requested architecture IS in the supported list, yet inspect_model_cls still failed to return a class for it — meaning registration exists but loading/inspection of the class errored (see the subprocess error) or returned nothing. It directs you to the logs for the underlying failure.","triggerScenarios":"Calling inspect_model_cls or resolve_model_cls with architectures=['FooModel'] where 'FooModel' appears in get_supported_archs(), but _try_load_model_cls returned None — e.g. the lazy module:class import failed silently or the subprocess inspection crashed.","commonSituations":"A model registered via lazy string whose module was renamed; partially failing registration in a plugin; an architecture registered but its inspection skipped due to a prior exception that was caught and logged.","solutions":["Check preceding log lines for the inspection/load failure for that architecture (often the same root cause as the subprocess RuntimeError)","Verify the lazy '<module>:<class>' target still imports: python -c 'from m import C; print(C)'","Re-register the model with a corrected target or pass the class directly","If the class exists but inspection filters it out (abstract/wrong base), fix the class or its registration"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"from importlib import import_module\nmod, cls = lazy_ref.split(':')\ngetattr(import_module(mod), cls)  # fails fast if inspection would fail","typeGuard":null,"tryCatchPattern":"try:\n    model_cls = registry.resolve_model_cls(config)\nexcept ValueError as e:\n    if 'failed to be inspected' in str(e):\n        log.error('registered but broken model; check earlier subprocess logs')\n    raise","preventionTips":["Log subprocess stderr at ERROR so the 'check the logs' pointer has content","Smoke-test every registered architecture on import in CI","Keep lazy registration targets in sync when modules are renamed"],"tags":["registry","model-resolution","architecture-unsupported"],"backgroundTag":"model-class-resolution-failed","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}