{"record":{"id":"5a54c3cbc6bbfdf7","repo":"vllm-project/vllm","slug":"compile-cache-save-format-must-be-binary-or-unp","errorCode":null,"errorMessage":"compile_cache_save_format must be 'binary' or 'unpacked', got: {value}","messagePattern":"compile_cache_save_format must be 'binary' or 'unpacked', got: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"vllm/config/compilation.py","lineNumber":884,"sourceCode":"    def validate_cudagraph_mode_before(cls, value: Any) -> Any:\n        \"\"\"Enable parsing of the `cudagraph_mode` enum type from string.\"\"\"\n        if isinstance(value, str):\n            return CUDAGraphMode[value.upper()]\n        return value\n\n    @field_validator(\"pass_config\", mode=\"before\")\n    @classmethod\n    def validate_pass_config_before(cls, value: Any) -> Any:\n        \"\"\"Enable parsing of the `pass_config` field from a dictionary.\"\"\"\n        if isinstance(value, dict):\n            return PassConfig(**value)\n        return value\n\n    @field_validator(\"compile_cache_save_format\")\n    @classmethod\n    def validate_compile_cache_save_format(cls, value: str) -> str:\n        if value not in (\"binary\", \"unpacked\"):\n            raise ValueError(\n                f\"compile_cache_save_format must be 'binary' or 'unpacked', \"\n                f\"got: {value}\"\n            )\n        return value\n\n    @field_validator(\n        \"level\",\n        \"mode\",\n        \"cudagraph_mode\",\n        \"max_cudagraph_capture_size\",\n        \"use_inductor_graph_partition\",\n        \"ir_enable_torch_wrap\",\n        mode=\"wrap\",\n    )\n    @classmethod\n    def _skip_none_validation(cls, value: Any, handler: Callable) -> Any:\n        \"\"\"Skip validation if the value is `None` when initialisation is delayed.\"\"\"\n        if value is None:","sourceCodeStart":866,"sourceCodeEnd":902,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/vllm/config/compilation.py#L866-L902","documentation":"CompilationConfig.compile_cache_save_format controls how compiled artifacts are persisted; only 'binary' (packed compiled cache) and 'unpacked' (json + so files) are implemented. Any other string fails the pydantic field validator with ValueError.","triggerScenarios":"Setting compilation_config=CompilationConfig(compile_cache_save_format='json') or 'safetensors' etc.; commonly set when preparing a shared/distributed compilation cache.","commonSituations":"Guessing format names; using configs written for other torch versions (e.g. torch inductor cache formats like 'inductor'); copy-paste from docs of a different tool.","solutions":["Set compile_cache_save_format='binary' (default, single file) or 'unpacked' (directory of json + shared objects).","Omit the field to keep the default.","If you need a different format for artifact distribution, post-process the unpacked output yourself."],"exampleFix":"# before\nCompilationConfig(compile_cache_save_format='json')\n# after\nCompilationConfig(compile_cache_save_format='unpacked')","handlingStrategy":"type-guard","validationCode":"VALID = {'binary', 'unpacked'}\ndef valid_save_format(v: str) -> bool:\n    return v in VALID","typeGuard":"def is_valid_save_format(value) -> bool:\n    return value in ('binary', 'unpacked')","tryCatchPattern":null,"preventionTips":["Restrict format options to the two supported values in config UIs","Default to omitting the field","Validate config files before deployment"],"tags":["configuration","compile-cache","vllm"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}