Skip to content

fix(inference): stop stacking duplicate line labels per hardware (#470) - #504

Merged
Oseltamivir merged 1 commit into
masterfrom
claude/issue-470-20260628-1158
Jun 29, 2026
Merged

Oseltamivir merged 1 commit into
masterfrom
claude/issue-470-20260628-1158

Conversation

@Oseltamivir

@Oseltamivir Oseltamivir commented Jun 29, 2026 •

Copy link
Copy Markdown
Contributor

Combines the two #470 follow-up branches into one.

What's included

  • Duplicate line labels fix (from claude/issue-470-20260628-1043): with a single precision selected, the scatter chart de-duplicates line labels to one per hardware, but three visibility-sync paths re-showed hidden duplicates because they keyed off data-hw-key alone. Now the render's per-label visible decision is persisted as a data-visible attribute and respected in all three opacity-sync paths via pure, unit-tested helpers in line-label-visibility.ts.

What's NOT included (and why)

  • The stale FP4-default fix (claude/issue-470-20260618-0436) was dropped: master already fixes the original issue with a more general mechanism (resolveEffectivePrecisions auto-picks the densest precision until the user explicitly chooses). For MiniMax M3 this auto-selects FP8. Re-applying the old static defaultPrecisions approach would regress that.

Verification (Playwright)

  • Duplicate-label URL from the issue: exactly one label per hardware per chart (was 3x stacked).
  • /inference?g_model=MiniMax-M3 opens with FP8 auto-selected, chart renders real data.
  • typecheck + lint + fmt + unit tests (2177) all green.
  • Works for both official runs and ?unofficialrun= overlays (shared .line-label join).

Closes #470

🤖 Generated with Claude Code


Note

Low Risk
Scoped chart-label visibility fix with extracted pure helpers and unit tests; no auth, data, or API changes.

Overview
Fixes GH #470: with one precision selected, inference scatter charts keep a single line label per hardware, but legend hover, hover-end, and filter-decoration sync re-showed hidden duplicates that share the same data-hw-key, stacking identical labels.

The roofline render now writes data-visible ('1'/'0') from each label’s de-duplication/collision decision. line-label-visibility.ts centralizes opacity for hover and steady-state (active hardware + precision, plus data-visible for line labels). ScatterGraph uses those helpers in all three sync paths instead of inline hwKey-only logic. Vitest covers the regression (hidden duplicates stay hidden on hover and when hardware is active).

Reviewed by Cursor Bugbot for commit 3981a1f. Bugbot is set up for automated code reviews on this repo. Configure here.

With a single precision selected, the scatter chart de-duplicates line
labels to one per hardware type (e.g. the b300_sglang fp4/fp8/bf16 curves
all collapse to a single "B300 (SGLang)" label). The render hides the
duplicates via a per-label `visible` flag, but three visibility-sync code
paths (legend hover, hover-end reset, filter-change effect) re-derived
line-label opacity from hardware membership alone. Because every duplicate
shares the same `data-hw-key`, all of them got re-shown — stacking three
identical "B300 (SGLang)" labels on the curve.

Persist the render's decision as a `data-visible` attribute and fold it
into every opacity decision via new pure helpers in line-label-visibility.ts
(unit-tested). Parallelism labels take the precision branch and are
unaffected.

Co-authored-by: Bryan Shan <[email protected]>
(cherry picked from commit aff62bb)
@Oseltamivir
Oseltamivir requested a review from adibarra as a code owner June 29, 2026 00:06
@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
inferencemax-app Ready Ready Preview, Comment Jun 29, 2026 12:06am

Request Review

@Oseltamivir
Oseltamivir merged commit 8f38615 into master Jun 29, 2026
18 checks passed
@Oseltamivir
Oseltamivir deleted the claude/issue-470-20260628-1158 branch June 29, 2026 01:11

This branch was successfully deployed

1 active deployment
Preview — 3981a1f0 Deployed Jun 28, 2026 by vercel[bot]
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.

Model defaults to only FP4, when only 1 curve

1 participant