feat: dynamic pass-through vLLM inference metrics to W&B - #3240
Open
mikasenghaas wants to merge 5 commits into
Open
feat: dynamic pass-through vLLM inference metrics to W&B#3240mikasenghaas wants to merge 5 commits into
mikasenghaas wants to merge 5 commits into
Conversation
Replace the hand-curated inference metric allowlist with a dynamic
pass-through collector: every vllm:* Prometheus family is logged,
per-engine under inference/engine/{id}/ and cross-engine aggregations
(min/max/mean/median/sum) under inference/{agg|prefill|decode}/.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… flag Hardcode poll interval, aggregations, and per-engine logging in the collector; config surface is unchanged from main (collect_inference_metrics + inference_metrics_roles). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Aug 12, 2026
Seven panels, each pairing the fleet aggregate (mean/sum) with the cross-engine tail that flags a single sick engine - max for pressure (KV usage, preemptions, waiting, prompt-token recompute), min for health (prefix hit rate, generation throughput). A saturated engine thrashing its KV cache hides inside fleet means; the tails surface it. Also compute the prefix-cache hit-rate ratio per engine (not only pooled over the fleet) so the min/max aggregations exist for it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Drop the vllm: family prefix (the collector only admits vllm:* families,
so it carries no information), flatten per-engine series from
inference/engine/{id}/... to inference/{id}/..., and move scope-level
quantiles (:p50 -> /p50) and the pooled ratio (-> /pooled) into the
stat segment so every key reads inference/{scope}/{metric}/{stat}.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mikasenghaas
marked this pull request as ready for review
August 13, 2026 03:43
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d7b9084. Configure here.
| "inference/agg/num_requests_waiting/max", | ||
| ], | ||
| ["inference/agg/prefix_cache_hit_rate/pooled", "inference/agg/prefix_cache_hit_rate/min"], | ||
| ["inference/agg/generation_tokens_total:rate/sum", "inference/agg/generation_tokens_total:rate/min"], |
There was a problem hiding this comment.
Agg generation min hides decode stalls
Medium Severity
The overview pairs fleet generation_tokens_total:rate/sum with /min on the agg scope. In disaggregated runs agg includes prefill engines whose generation rate stays at zero, so the min series is pinned at 0 and cannot flag a stalled decode engine. Decode-scoped min/sum series are logged but this panel does not use them.
Reviewed by Cursor Bugbot for commit d7b9084. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
vllm:*Prometheus family the engines emit is logged to W&B automatically.inference/{scope}/{metric}/{stat}, with thevllm:prefix stripped. Scopes:agg(all engines),prefill/decode(disaggregated only), and one scope per engine id (server0.0, ...).:rate. Histograms log_sum/_countplus:rate/:mean, and scope-level/p50|p90|p99from pooled bucket deltas.prefix_cache_hit_ratelogs/pooled(Δhits/Δqueries over the scope) plus per-engine aggregations (/min,/max, ...).{endpoint}.{engine_label}, so DP engines behind one endpoint get separate scopes. One code path covers all deployment types.collect_inference_metricstoggles collection;inference_metrics_rolesis still auto-derived for disaggregated runs.Breaking
inference/engine/{id}/vllm:*and the curated names are gone.running_imbalance/waiting_imbalanceare dropped — readmaxvsmean/minofnum_requests_running|waiting. The combinedthroughputalias is dropped — readprompt|generation_tokens_total:rate/sum.Verification
E2E on a SLURM H200 cluster (Qwen3-30B-A3B, alphabet-sort, 3 steps per deployment type, W&B project
inference-metrics-smoke):server0.0/server0.1— runafe1a971server0.0…server3.0— run6926f621prefill*/decode*scopes with exact scope-sum consistency (322 prefill prompt tokens = 226 + 96) — rune9098978; the 3-step loop is blocked by pre-existing PD serving issuesPer-run API checks: all five aggregations per metric, per-engine counters sum to the agg
sum, rates/quantiles/hit rate non-degenerate under live traffic.Schema e2e after the key rename: reverse-text RL, 20/20 steps, reward 0.16 → 0.71 — run vllm-metrics-schema-e2e. API-verified: 628
inference/*keys, zerovllm:prefixes, flattened engine scopes, quantiles as/p99, hit rate/pooled+/min, no legacy keys.Note
Medium Risk
Large refactor of orchestrator metrics logging with breaking W&B key renames and behavior change (no smoothing), but limited to observability—not training or inference serving logic.
Overview
Replaces the hand-curated vLLM Prometheus allowlist with dynamic pass-through of every
vllm:*family. Scrapes are parsed into per-engine snapshots (EngineSnapshot), logged per engine asinference/{endpoint.engine}/{metric}, and rolled up toinference/agg|prefill|decode/{metric}/{min|max|sum|mean|median}(plus histogram p50/p90/p99 from pooled bucket deltas and:rate/:meanderived from poll-interval deltas).Breaking observability changes: metric key names change entirely; the 20-sample smoothing window is removed (raw values each poll); curated aliases like
throughput,running_imbalance, and fixed-scope counters are dropped in favor of the generic naming scheme.The W&B overview workspace adds a dedicated inference section with multi-series panels (fleet aggregate vs min/max tail) for KV usage, preemptions, queue depth, prefix cache hit rate, and token rates; legacy inference keys are removed from the performance section.
Reviewed by Cursor Bugbot for commit d7b9084. Bugbot is set up for automated code reviews on this repo. Configure here.