{"record":{"id":"de0db20abf3c806d","repo":"vllm-project/vllm","slug":"proton-profiler-dir-must-be-set-when-profiler-is","errorCode":null,"errorMessage":"proton_profiler_dir must be set when profiler is 'proton'","messagePattern":"proton_profiler_dir must be set when profiler is 'proton'","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"vllm/config/profiler.py","lineNumber":211,"sourceCode":"            name\n            for name, value, default in (\n                (\"proton_profiler_dir\", proton_profiler_dir, \"\"),\n                (\"proton_context\", self.proton_context, \"shadow\"),\n                (\"proton_data\", self.proton_data, \"tree\"),\n                (\"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'\")","sourceCodeStart":193,"sourceCodeEnd":229,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/vllm/config/profiler.py#L193-L229","documentation":"Mirror of the torch rule: selecting profiler='proton' requires proton_profiler_dir, since each worker writes a rank-qualified profile file there. The dir is then expanded to an absolute local path.","triggerScenarios":"Passing --profiler-config profiler=proton without proton_profiler_dir.","commonSituations":"Assuming proton writes to CWD; switching from torch profiler to proton and forgetting that the dir field name differs (torch_profiler_dir vs proton_profiler_dir).","solutions":["Add proton_profiler_dir: --profiler-config profiler=proton,proton_profiler_dir=/tmp/proton.","Ensure the directory is local — remote URIs are rejected by a separate check."],"exampleFix":"# before\nProfilerConfig(profiler='proton')\n\n# after\nProfilerConfig(profiler='proton', proton_profiler_dir='/tmp/proton_out')","handlingStrategy":"validation","validationCode":"def validate_profiler_cfg(profiler: str | None, proton_dir: str) -> None:\n    if profiler == \"proton\" and not proton_dir:\n        raise SystemExit(\"profiler='proton' requires proton_profiler_dir (local path)\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Remember torch and proton use different dir field names; setting the wrong one silently fails this paired check."],"tags":["profiling","proton","configuration"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}