vllm-project/vllm · error · ValueError
{options} only applicable when profiler is set to 'proton'
Error message
{options} only applicable when profiler is set to 'proton' What it means
ProfilerConfig raises when any proton_* option (proton_profiler_dir, proton_context, proton_data != 'tree', proton_backend, proton_mode, proton_hook, proton_output_format) is set to a non-default value while profiler is not 'proton'. The validator diffs each option against its default and lists the offending names in the message.
Source
Thrown at vllm/config/profiler.py:207
)
proton_profiler_dir = self.proton_profiler_dir
non_default_proton_options = [
name
for name, value, default in (
("proton_profiler_dir", proton_profiler_dir, ""),
("proton_context", self.proton_context, "shadow"),
("proton_data", self.proton_data, "tree"),
("proton_backend", self.proton_backend, None),
("proton_mode", self.proton_mode, None),
("proton_hook", self.proton_hook, None),
("proton_output_format", self.proton_output_format, None),
)
if value != default
]
if self.profiler != "proton" and non_default_proton_options:
options = ", ".join(non_default_proton_options)
raise ValueError(
f"{options} only applicable when profiler is set to 'proton'"
)
if self.profiler == "proton" and not proton_profiler_dir:
raise ValueError(
"proton_profiler_dir must be set when profiler is 'proton'"
)
if proton_profiler_dir:
if _is_uri_path(proton_profiler_dir):
raise ValueError("proton_profiler_dir must be a local directory")
self.proton_profiler_dir = os.path.abspath(
os.path.expanduser(proton_profiler_dir)
)
if self.profiler == "proton":
output_format = self.proton_output_format
if output_format == "chrome_trace" and self.proton_data != "trace":
raise ValueError("chrome_trace output requires proton_data='trace'")
if (View on GitHub (pinned to c794754062)
Solutions
- Set profiler='proton' alongside the proton options.
- Or strip the listed proton_* keys from the config when using torch/cuda profiling.
- Note proton_data='tree' and proton_context='shadow' are defaults and alone do not trigger this.
Example fix
# before ProfilerConfig(proton_backend='cupti', proton_profiler_dir='/tmp/p') # after ProfilerConfig(profiler='proton', proton_backend='cupti', proton_profiler_dir='/tmp/p')
Defensive patterns
Strategy: validation
Validate before calling
PROTON_DEFAULTS = {"proton_context": "shadow", "proton_data": "tree",
"proton_backend": None, "proton_mode": None,
"proton_hook": None, "proton_output_format": None}
def non_default_proton_opts(cfg_kwargs: dict) -> list[str]:
return [k for k, d in PROTON_DEFAULTS.items() if cfg_kwargs.get(k, d) != d]
def validate(cfg_kwargs: dict) -> None:
opts = non_default_proton_opts(cfg_kwargs)
if opts and cfg_kwargs.get("profiler") != "proton":
raise SystemExit(f"{opts} require profiler='proton'") Prevention
- Namespace profiler options per kind in your config templates so proton_* keys are never mixed into torch configs.
When it happens
Trigger: Passing e.g. --profiler-config proton_profiler_dir=/tmp/p,proton_backend=cupti while profiler is None or 'torch'. Any one non-default proton option with a different profiler kind triggers it.
Common situations: Shared profiler-config strings reused across profiler kinds; enabling proton knobs from a profiling guide without selecting the proton profiler itself.
Related errors
- proton_profiler_dir must be set when profiler is 'proton'
- proton_profiler_dir must be a local directory
- chrome_trace output requires proton_data='trace'
- {output_format} output requires proton_data='tree'
- Unable to use nsight profiling unless workers run with Ray.
AI-assisted analysis of vllm-project/vllm@c794754062 (2026-08-14).
Data as JSON: /api/errors/01f154037def3235.
Report an issue: GitHub.