Skip to content

Fix magpie profiler flags - #755

Open
kyle-hoffmeyer wants to merge 1 commit into
mainfrom
fix/magpie-skill/profiler-flags
Open

Fix magpie profiler flags#755
kyle-hoffmeyer wants to merge 1 commit into
mainfrom
fix/magpie-skill/profiler-flags

Conversation

@kyle-hoffmeyer

@kyle-hoffmeyer kyle-hoffmeyer commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

The profiler flag and profiler_dir need to be set but are currently not required in the skill file, causing the profiling to fail before the agent corrects itself.

From vllm/config/profiler.py that TraceLens patches:

if self.profiler == "torch" and not profiler_dir:
      raise ValueError("torch_profiler_dir must be set when profiler is 'torch'")

and

if capture_dir and self.profiler != "torch":
    raise ValueError(
        "capture_torch_profiler_dir is only applicable when profiler is set to 'torch'"
    )

Now the flags are correctly passed into EXTRA_VLLM_ARGS.

Additionally, previously the patches ignored whatever profiler-config.capture_torch_profiler_dir was set to and always set it to torch_profiler_dir + "/capture_traces". Now, profiler-config.capture_torch_profiler_dir properly sets the capture trace directory

@kyle-hoffmeyer kyle-hoffmeyer changed the title Fix profiler flags Fix magpie profiler flags Jun 20, 2026
…rofiler_dir path

Three fixes:

1. Fix benchmark_lib.sh sed pattern: InferenceX uses num_prompts="$max_concurrency"
   not num_prompts="$((max_concurrency * 1))". The old pattern silently no-ops,
   leaving num_prompts at CONC and causing the benchmark to finish before the
   profiling delay window is reached.

2. Add missing required --profiler-config.profiler torch and
   --profiler-config.torch_profiler_dir flags to the common vLLM flags section.
   Without these, vLLM's ProfilerConfig validator raises a pydantic ValueError
   at startup and refuses to launch.

3. Fix capture_torch_profiler_dir to actually control the capture trace output
   path. Previously gpu_model_runner.py ignored the flag's value and derived
   the path as torch_profiler_dir + "/capture_traces". All 8 vLLM patches
   updated to use capture_torch_profiler_dir directly as trace_dir.

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
@kyle-hoffmeyer
kyle-hoffmeyer force-pushed the fix/magpie-skill/profiler-flags branch from 2ec0d86 to e971881 Compare June 20, 2026 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant