{"record":{"id":"6a78626076a1c126","repo":"vllm-project/vllm","slug":"chrome-trace-output-requires-proton-data-trace","errorCode":null,"errorMessage":"chrome_trace output requires proton_data='trace'","messagePattern":"chrome_trace output requires proton_data='trace'","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"vllm/config/profiler.py","lineNumber":224,"sourceCode":"            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'\"\n            )\n\n        return self\n","sourceCodeStart":206,"sourceCodeEnd":238,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/vllm/config/profiler.py#L206-L238","documentation":"ProfilerConfig enforces consistency between proton_output_format and proton_data when profiler='proton'. chrome_trace output requires the 'trace' data mode, because a Chrome trace can only be produced from trace-style records, not from the hierarchical tree data.","triggerScenarios":"Passing --profiler-config profiler=proton,proton_output_format=chrome_trace with proton_data left at its default 'tree' (or explicitly 'tree').","commonSituations":"Users wanting Chrome-trace output without realizing the data mode must change to 'trace'; copying output-format options from a profiling script that assumed trace data.","solutions":["Set proton_data='trace' together with proton_output_format='chrome_trace'.","Or keep proton_data='tree' and use a hatchet output format instead."],"exampleFix":"# before\nProfilerConfig(profiler='proton', proton_profiler_dir='/tmp/p', proton_output_format='chrome_trace')\n\n# after\nProfilerConfig(profiler='proton', proton_profiler_dir='/tmp/p', proton_data='trace', proton_output_format='chrome_trace')","handlingStrategy":"validation","validationCode":"def validate_proton_output(data: str, fmt: str | None) -> None:\n    if fmt == \"chrome_trace\" and data != \"trace\":\n        raise SystemExit(\"proton_output_format='chrome_trace' requires proton_data='trace'\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pair (data, format) explicitly: ('trace','chrome_trace') or ('tree','hatchet'|'hatchet_msgpack')."],"tags":["profiling","proton","configuration"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}