You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(inference): measured-power Y-axis metrics on scatter chart
Adds two new options under a new "Measured Energy" dropdown group on
both the "vs. Interactivity" and "vs. E2E Latency" charts:
- Measured Avg Power per GPU (W) — no roofline (no universal
"better" direction)
- Measured J per Output Token (J/tok) — roofline lower_right
(interactivity) / lower_left
(e2e)
Distinct from the existing y_jTotal/y_jOutput/y_jInput which derive
joules from each GPU's spec-sheet TDP. The new metrics are sourced
from runner GPU telemetry averaged over the exact bench load window
(see aggregate_power.py in semianalysisai/InferenceX).
Wiring:
- packages/constants/src/metric-keys.ts: register avg_power_w,
joules_per_output_token in the canonical metric key set so the ETL
auto-capture warning doesn't fire.
- packages/app/src/lib/benchmark-transform.ts: pass the two raw
fields through rowToAggDataEntry. Left undefined when absent so
downstream code can distinguish "no measurement" from "0 W".
- packages/app/src/components/inference/types.ts: extend AggDataEntry,
InferenceData, YAxisMetricKey, and ChartDefinition.
- packages/app/src/lib/chart-utils.ts: extend Y_AXIS_METRICS,
createChartDataPoint (gated on typeof===number), calculateRoofline
and computeAllRooflines yKey union, markRooflinePoints init+mark
blocks.
- packages/app/src/components/inference/inference-chart-config.json:
add y_measured* entries to both chartTypes.
- packages/app/src/components/inference/ui/ChartControls.tsx: add
"Measured Energy" group to METRIC_GROUPS.
The overlay (unofficial run) path is automatic — transformBenchmarkRows
is shared between official and overlay rendering, so the new metrics
flow to ?unofficialrun= URLs once the runner-side PR is merged and
benchmarks ingest the new fields.
For rows without measured-power data (historical runs, runs predating
aggregate_power.py, runs where the SMI poller didn't start), points
are simply omitted from the new charts — the existing TDP-derived
y_jTotal/y_jOutput/y_jInput stay visible as a comparable fallback.
Verification:
- pnpm typecheck: clean
- pnpm lint: 0 warnings, 0 errors
- pnpm test:unit: 1921/1921 passing (+7 new tests covering
rowToAggDataEntry pass-through, createChartDataPoint field gating,
zero-value preservation, missing-field handling)
- Dev-server smoke: confirmed "Measured Energy" group label and
both metric labels are present in the served JS bundle at
/_next/static/chunks/
Follow-up: Cypress E2E covering both the official path and
?unofficialrun= overlay path for the two new metrics, to be added
once the runner PR ships real data to the DB.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments