{"record":{"id":"661f3b42bf65d6cd","repo":"vllm-project/vllm","slug":"parent-directory-for-fp8-scale-save-path-not-found","errorCode":null,"errorMessage":"Parent directory for FP8 scale save path not found: {save_parent}","messagePattern":"Parent directory for FP8 scale save path not found: (.+?)","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"vllm/config/multimodal.py","lineNumber":345,"sourceCode":"            )\n        if (\n            self.mm_encoder_fp8_scale_path is not None\n            and self.mm_encoder_fp8_scale_save_path is not None\n        ):\n            raise ValueError(\n                \"'mm_encoder_fp8_scale_save_path' cannot be used with \"\n                \"'mm_encoder_fp8_scale_path' (saving requires dynamic scaling).\"\n            )\n\n        # Validate file paths exist.\n        if self.mm_encoder_fp8_scale_path is not None:\n            scale_path = Path(self.mm_encoder_fp8_scale_path)\n            if not scale_path.is_file():\n                raise FileNotFoundError(f\"FP8 scale file not found: {scale_path}\")\n        if self.mm_encoder_fp8_scale_save_path is not None:\n            save_parent = Path(self.mm_encoder_fp8_scale_save_path).parent\n            if not save_parent.is_dir():\n                raise FileNotFoundError(\n                    f\"Parent directory for FP8 scale save path not found: {save_parent}\"\n                )\n        return self\n\n    @staticmethod\n    def fold_mm_processor_device(\n        mm_processor_kwargs: dict[str, Any] | None,\n        mm_processor_device: MMProcessorDevice | None,\n    ) -> dict[str, Any] | None:\n        \"\"\"Fold the `mm_processor_device` convenience flag into the kwargs.\n\n        The flag keeps no state of its own: `mm_processor_kwargs[\"device\"]` is\n        the only representation of where the processor runs, so an explicit\n        `device` there always wins and `\"auto\"` stays unresolved for\n        `VllmConfig`, which is where the EC role needed to resolve it lives.\n\n        Args:\n            mm_processor_kwargs: The kwargs as given, or None.","sourceCodeStart":327,"sourceCodeEnd":363,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/vllm/config/multimodal.py#L327-L363","documentation":"The final check in MultiModalConfig's validator confirms the parent directory of mm_encoder_fp8_scale_save_path exists (Path(...).parent.is_dir()). Because the save step only creates the file, not its directory, a missing parent directory is rejected up front with FileNotFoundError.","triggerScenarios":"Passing --mm-encoder-fp8-scale-save-path /tmp/does-not-exist/out.pt when /tmp/does-not-exist does not exist; nested output dirs like runs/exp1/ never created; save path on an unmounted volume.","commonSituations":"Calibration output directories that the user expected vLLM to create (mkdir -p behavior); Kubernetes pods where the output PVC is mounted at a different path.","solutions":["Create the parent directory before launching: mkdir -p $(dirname <save-path>).","Point the save path at a directory that already exists (e.g. under /tmp or your mounted output volume).","Add a mkdir -p step to your launch script or container entrypoint."],"exampleFix":"# before\nvllm serve model --mm-encoder-attn-dtype fp8 --mm-encoder-fp8-scale-save-path runs/exp1/scales.pt\n\n# after\nmkdir -p runs/exp1\nvllm serve model --mm-encoder-attn-dtype fp8 --mm-encoder-fp8-scale-save-path runs/exp1/scales.pt","handlingStrategy":"validation","validationCode":"from pathlib import Path\n\ndef check_save_dir(p: str | None) -> None:\n    if p is not None and not Path(p).parent.is_dir():\n        Path(p).parent.mkdir(parents=True, exist_ok=True)  # or fail early with a clear message","typeGuard":null,"tryCatchPattern":null,"preventionTips":["mkdir -p the output directory in the launch script before starting vLLM.","In Kubernetes, ensure the output PVC is mounted and the subPath exists."],"tags":["vllm","config","multimodal","fp8","file-not-found","paths"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}