feat(inference): default to the best line per SKU / feat(inference):默认显示每个 SKU 的最佳曲线 - #713
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Rank configuration frontiers over each SKU's shared measured domain, default the inference legend to the winner, and keep a bilingual toggle plus unofficial-run overlay support. 中文:推理图表默认按每个 SKU 的共同实测区间评选并展示最佳配置曲线,同时提供中英文切换控件,并支持非官方运行覆盖。
9044b80 to
d842914
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b269baa. Configure here.
|
@claude fix the failing time zone sensitive test |
|
Claude finished @adibarra's task in 1m 35s —— View job Fix failing time-zone-sensitive test
Root cause: Fix: function setNow(iso: string) {
// …parse as local time to match visit-tracking's local-calendar-day logic…
vi.setSystemTime(new Date(iso.replace(/Z$/u, '')));
}Verification —
Pushed as |
Interpret the fake-timer timestamps as local time so the day/month boundary assertions match visit-tracking's local-calendar-day logic. The trailing 'Z' forced UTC parsing, which shifted 2026-05-15T22:00:00Z to 2026-05-16 in UTC+8 (Asia/Singapore), flaking the "same day, new session" case. 中文:将假定时器时间戳按本地时区解析,使日期/月份边界断言与 visit-tracking 的本地日历日逻辑一致,修复在 Asia/Singapore(UTC+8) 时区下因末尾 'Z' 触发 UTC 解析导致的时区敏感测试失败。 Co-authored-by: Alec Ibarra <93070681+adibarra@users.noreply.github.com>
|
@claude also resolve the cursor pr comments |
|
Claude finished @adibarra's task in 7m 52s —— View job Re-review + resolve Cursor Bugbot commentsAll three Bugbot findings are valid. I implemented and verified fixes for each — but this run is the read-only review job, and its token is denied push access (
What each fix does#1 — Ranking ignores selected precision (
#2 — Overlay toggle keeps Best per SKU ( #3 — Overlay misses default best selection ( Verification
Patch (apply on
|

Summary
/inferenceto the winning configuration while preserving manual legend selection and a shareableBest per SKUtoggle?unofficialrun=overlays, including overlay scope changes每个 SKU 仅显示最佳配置) and focused official/overlay testsWhy
Several frameworks, deployment modes, and speculative-decoding variants can produce many lines for the same chip. Showing one representative winner per SKU makes the initial comparison readable without removing access to the other configurations.
Validation
bun run typecheckbun run lintbun run fmtvisit-tracking.test.ts(2026-05-15T22:00:00Zis the next local calendar day in Asia/Singapore)DATABASE_READONLY_URL; the local run was stopped after availability returned 500 because that variable is not configuredWorks for both official runs and
?unofficialrun=overlays; verified through the component overlay suite.Note
Medium Risk
Changes default legend selection and URL semantics on
/inference, but manual toggles andi_best=0preserve prior behavior; ranking is localized to chart filtering, not auth or data APIs.Overview
Adds a Best per SKU mode on the inference dashboard so the legend starts with one winning
hwKeyper physical chip instead of every framework/deployment variant.Selection uses a new
bestSeriesPerSkuhelper: group series by SKU, build each candidate’s Pareto frontier for the active chart roofline direction, then pick the winner by normalized AUC over the shared measured x-range (so wider curves don’t win by span alone). Ties break onhwKey.InferenceContext owns
bestPerSku(on by default on the inference tab unlessi_best=0), computesbestHwTypesfrom the current interactivity/e2e graph and y-metric, and uses that set for automatic hardware resets when model/sequence/metric/x-mode changes. Manual legend edits, select-all, or presets turn the mode off. Share URLs gaini_best.ScatterGraph exposes a legend switch (EN + zh copy) that reapplies best selection for official + overlay preview runs. ChartDisplay applies the same policy when unofficial overlay scope changes so tables/charts stay aligned.
Vitest coverage for the ranking helper; Cypress mocks updated;
visit-tracking.testfixes flaky calendar-day handling under non-UTC timezones.Reviewed by Cursor Bugbot for commit 0aaf379. Bugbot is set up for automated code reviews on this repo. Configure here.