{"record":{"id":"d50e063ca8a51372","repo":"vllm-project/vllm","slug":"proton-profiler-dir-must-be-a-local-directory","errorCode":null,"errorMessage":"proton_profiler_dir must be a local directory","messagePattern":"proton_profiler_dir must be a local directory","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"vllm/config/profiler.py","lineNumber":216,"sourceCode":"                (\"proton_backend\", self.proton_backend, None),\n                (\"proton_mode\", self.proton_mode, None),\n                (\"proton_hook\", self.proton_hook, None),\n                (\"proton_output_format\", self.proton_output_format, None),\n            )\n            if value != default\n        ]\n        if self.profiler != \"proton\" and non_default_proton_options:\n            options = \", \".join(non_default_proton_options)\n            raise ValueError(\n                f\"{options} only applicable when profiler is set to 'proton'\"\n            )\n        if self.profiler == \"proton\" and not proton_profiler_dir:\n            raise ValueError(\n                \"proton_profiler_dir must be set when profiler is 'proton'\"\n            )\n        if proton_profiler_dir:\n            if _is_uri_path(proton_profiler_dir):\n                raise ValueError(\"proton_profiler_dir must be a local directory\")\n            self.proton_profiler_dir = os.path.abspath(\n                os.path.expanduser(proton_profiler_dir)\n            )\n\n        if self.profiler == \"proton\":\n            output_format = self.proton_output_format\n            if output_format == \"chrome_trace\" and self.proton_data != \"trace\":\n                raise ValueError(\"chrome_trace output requires proton_data='trace'\")\n            if (\n                output_format in (\"hatchet\", \"hatchet_msgpack\")\n                and self.proton_data != \"tree\"\n            ):\n                raise ValueError(f\"{output_format} output requires proton_data='tree'\")\n\n        if self.capture_torch_profiler and self.profiler != \"torch\":\n            raise ValueError(\n                \"capture_torch_profiler is only applicable when profiler is \"\n                \"set to 'torch'\"","sourceCodeStart":198,"sourceCodeEnd":234,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/vllm/config/profiler.py#L198-L234","documentation":"ProfilerConfig rejects proton_profiler_dir values that look like URIs (contain scheme:// with a multi-character scheme, e.g. gs://, s3://). Unlike torch traces, proton profiles must be written to a local directory because the proton tooling writes rank-qualified files directly; the config expands the path to an absolute local path afterwards.","triggerScenarios":"Setting proton_profiler_dir='gs://my-bucket/profiles' or any s3:// / hdfs:// style path while profiler='proton'.","commonSituations":"Cloud deployments reusing a remote trace bucket path that worked for torch_profiler_dir (which does support URIs); CI configs with uniform remote artifact paths.","solutions":["Point proton_profiler_dir at a local directory (e.g. /tmp/proton).","Upload the local output to the bucket after profiling completes (separate step)."],"exampleFix":"# before\nProfilerConfig(profiler='proton', proton_profiler_dir='gs://bucket/prof')\n\n# after\nProfilerConfig(profiler='proton', proton_profiler_dir='/tmp/prof')  # sync to bucket afterwards","handlingStrategy":"validation","validationCode":"def is_uri(path: str) -> bool:\n    return \"://\" in path and len(path.split(\"://\")[0]) > 1\n\ndef validate_proton_dir(proton_dir: str) -> None:\n    if is_uri(proton_dir):\n        raise SystemExit(\"proton_profiler_dir must be local; sync to remote storage afterwards\")","typeGuard":"def is_local_proton_dir(path: str) -> bool:\n    return \"://\" not in path","tryCatchPattern":null,"preventionTips":["Do not reuse remote trace-bucket URIs that work for torch_profiler_dir with proton; proton requires local writes."],"tags":["profiling","proton","path","configuration"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}