{"record":{"id":"3a0aa825090afc1a","repo":"sgl-project/sglang","slug":"invalid-warmup-mode-self-warmup-mode-r-expect","errorCode":null,"errorMessage":"Invalid --warmup-mode {self.warmup_mode!r}; expected one of {WARMUP_MODES}.","messagePattern":"Invalid --warmup-mode (.+?); expected one of (.+?)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/server_args/server_args.py","lineNumber":1162,"sourceCode":"    ) -> tuple[AttentionBackendEnum | None, str | None]:\n        for component_name in component_names:\n            if component_name is None:\n                continue\n            key = component_name.replace(\"-\", \"_\")\n            fallback_keys = [key]\n            if key.endswith(\"_2\"):\n                # Secondary two-stage components inherit the base component\n                # backend unless explicitly overridden.\n                fallback_keys.append(key[:-2])\n            for backend_key in fallback_keys:\n                backend = self.component_attention_backends.get(backend_key)\n                if backend is not None:\n                    return AttentionBackendEnum[backend.upper()], backend_key\n        return None, None\n\n    def _adjust_warmup(self):\n        if self.warmup_mode is not None and self.warmup_mode not in WARMUP_MODES:\n            raise ValueError(\n                f\"Invalid --warmup-mode {self.warmup_mode!r}; \"\n                f\"expected one of {WARMUP_MODES}.\"\n            )\n        if self.warmup_num_frames is not None and self.warmup_num_frames <= 0:\n            raise ValueError(\"--warmup-num-frames must be a positive integer.\")\n\n        if self.enable_torch_compile and self.warmup_mode is None:\n            self.warmup_mode = \"server\"\n            logger.info(\n                \"Automatically enabled server warmup for torch.compile so first \"\n                \"real requests do not pay compile latency. Set --warmup-mode off \"\n                \"to disable this behavior.\"\n            )\n\n        # Explicit warmup shapes need a request path unless an existing server\n        # default already supplies the synthetic startup request.\n        if (\n            self.warmup_resolutions is not None or self.warmup_num_frames is not None","sourceCodeStart":1144,"sourceCodeEnd":1180,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/server_args/server_args.py#L1144-L1180","documentation":"--warmup-mode must be one of the WARMUP_MODES constants (e.g. 'off', 'server', ...) when explicitly provided. The check runs during argument adjustment (_adjust_warmup), before any warmup behavior is configured.","triggerScenarios":"Passing --warmup-mode none or --warmup-mode full when the valid set is e.g. {'off','server',...}.","commonSituations":"Version changes adding/renaming warmup modes; guessing mode names; copying flags from another deployment with different supported modes.","solutions":["Check WARMUP_MODES in this version's server_args module and use an exact value","Omit --warmup-mode to take the default (auto 'server' when torch.compile is on)","Fix typos/casing per the supported set"],"exampleFix":"# before\n--warmup-mode none\n# after\n--warmup-mode off","handlingStrategy":"validation","validationCode":"from sglang.multimodal_gen.runtime.server_args.server_args import WARMUP_MODES\nassert warmup_mode is None or warmup_mode in WARMUP_MODES","typeGuard":"def is_valid_warmup_mode(m) -> bool:\n    return m is None or m in WARMUP_MODES","tryCatchPattern":null,"preventionTips":["Pin docs and code to the same version","Print valid modes in error messages of your launcher"],"tags":["config","cli","warmup","validation"],"backgroundTag":"invalid-enum-value","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}