Repository navigation
fix(inference): stop stacking duplicate line labels per hardware (#470) - #504
Merged
Merged
Conversation
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)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Combines the two #470 follow-up branches into one.
What's included
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 offdata-hw-keyalone. Now the render's per-labelvisibledecision is persisted as adata-visibleattribute and respected in all three opacity-sync paths via pure, unit-tested helpers inline-label-visibility.ts.What's NOT included (and why)
claude/issue-470-20260618-0436) was dropped:masteralready fixes the original issue with a more general mechanism (resolveEffectivePrecisionsauto-picks the densest precision until the user explicitly chooses). For MiniMax M3 this auto-selects FP8. Re-applying the old staticdefaultPrecisionsapproach would regress that.Verification (Playwright)
/inference?g_model=MiniMax-M3opens with FP8 auto-selected, chart renders real data.?unofficialrun=overlays (shared.line-labeljoin).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.tscentralizes opacity for hover and steady-state (active hardware + precision, plusdata-visiblefor line labels).ScatterGraphuses those helpers in all three sync paths instead of inlinehwKey-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.