fix(inference): preserve mixed engines across preview scopes / 修复推理预览切换范围后混合引擎丢失问题#577
Merged
Merged
Conversation
Seed each new unofficial-preview scope from all eligible official and overlay series so model, sequence, and precision changes do not restore the production engine-family filter. Add component coverage for mixed vLLM and SGLang series surviving a scope change, rerender, and overlay dismissal. 中文:修复非官方运行预览在切换模型、序列或精度后丢失部分引擎系列的问题。新预览范围会保留所有符合条件的官方与叠加系列,并新增覆盖范围切换、重新渲染及叠加运行隐藏操作的组件测试。
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Bypass the production engine-family exclusion throughout InferenceProvider while an unofficial run is loaded, reset the full hardware scope when preview mode changes, and suppress stale conflict notices. Remove D3 overlay marks when the last preview run is dismissed and cover both the preview-only exclusion policy and overlay cleanup with regressions. 中文:非官方运行加载期间,在 InferenceProvider 全链路停用正式环境的引擎系列互斥规则;切换预览模式时重置完整硬件范围,并隐藏过期的冲突提示。最后一个预览运行被移除后会同步清理 D3 叠加标记,同时新增针对预览互斥策略和叠加清理的回归测试。
Do not persist an empty official selection while benchmark graphs for a new unofficial-preview scope are still loading. Commit the scope only after official data arrives or loading finishes. Extend the scope-transition regression to render overlays first, then load mixed vLLM and SGLang official rows and verify that all four series remain visible. 中文:切换非官方运行预览范围时,如果官方基准图表仍在加载,不再把临时空集合持久化为官方选择。仅在官方数据到达或加载结束后提交新范围,并扩展回归测试,覆盖叠加数据先到、vLLM 与 SGLang 官方数据后到的场景。
Keep overlay scope transition seeding limited to charts with preview data so official-only legend toggles continue to follow activeHwTypes. Add a component regression for switching scopes without an unofficial run. 中文:将预览范围切换逻辑限定在包含 unofficial run 数据的图表中,确保仅官方数据的图表切换范围后,图例筛选仍会正确跟随 activeHwTypes;并新增无 unofficial run 场景的组件回归测试。
Use local official selection overrides only while an unofficial run preview is active, keeping official-only chart, table, and export visibility synchronized with activeHwTypes after scope changes. Add a component regression for the official table path. 中文:仅在加载 unofficial run 预览时使用本地官方硬件选择覆盖,确保仅官方数据的图表、表格和导出在切换范围后仍与 activeHwTypes 保持同步;并新增官方表格路径的组件回归测试。
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort 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 7f4920f. Configure here.
Keep ScatterGraph preview scope transitions pending while official benchmarks are still loading so overlay reconciliation cannot clear or replace the mixed-engine selection before ChartDisplay seeds the new scope. Add delayed-data component coverage. 中文:官方基准测试仍在加载时,保持 ScatterGraph 的预览范围切换处于待处理状态,避免叠加数据对账在 ChartDisplay 初始化新范围前清空或替换混合引擎选择;并新增延迟数据场景的组件测试。
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
InferenceProviderwhile an unofficial run preview is loaded.activeHwTypesset.Follow-up to #575 and #576. This addresses the post-merge Bugbot finding in #576 (comment).
Root cause
#576 stored preview-only mixed official selections in
localOfficialOverride, whileInferenceProvidercontinued applying the production exclusion toactiveHwTypes. Scope changes and provider resets could therefore drop engine families or show a false restriction notice. Dismissing the last run also removed the React overlay data without deleting the previous custom D3 layer's DOM.Validation
pnpm lintpnpm fmtpnpm typecheck?unofficialrun=29272097721: Agentic Traces rendered 10 unofficial points with 3 vLLM and 3 SGLang official rooflines, no engine-conflict toast, and dismissing the run removed all unofficial points and rooflinesWorks for both official runs and
?unofficialrun=overlays. Official-only views retain the production comparability guard; preview views allow mixed engines across chart, legend, reset, table, scope changes, and run dismissal.中文说明
InferenceProvider全链路停用正式环境的引擎系列互斥规则。activeHwTypes。这是 #575 和 #576 的后续修复,并处理了 #576 合并后 Bugbot 指出的回归问题:https://github.com/SemiAnalysisAI/InferenceX-app/pull/576#discussion_r3575247628。
根因
#576 通过
localOfficialOverride保存仅用于预览的混合官方引擎选择,但InferenceProvider仍会对activeHwTypes应用正式环境的互斥规则。因此,切换范围或 Provider 重置时仍可能丢失部分引擎系列,或错误显示限制提示。移除最后一个运行时,React 侧虽然清除了叠加数据,但之前创建的 D3 自定义图层 DOM 没有同步删除。验证
pnpm lintpnpm fmtpnpm typecheck?unofficialrun=29272097721进行真实运行浏览器验证:Agentic Traces 同时渲染 10 个非官方数据点、3 条 vLLM 与 3 条 SGLang 官方 roofline,未出现引擎冲突提示;移除该运行后,所有非官方数据点和 roofline 均被清理官方运行和
?unofficialrun=叠加路径均受支持。仅官方数据的视图继续保留正式环境兼容性限制;预览视图则在图表、图例、重置、表格、范围切换和运行移除等路径中允许混合引擎。Note
Medium Risk
Touches inference legend, table filtering, and exclusion logic on chart/table paths; behavior is split between official and preview modes but covered by expanded Cypress and unit tests.
Overview
Fixes preview (
?unofficialrun=) charts losing mixed engine families or showing wrong legend/table rows when model, sequence, or precision changes, or when official data loads after overlays.Unofficial preview now skips the production engine-family exclusion via
comparisonExclusioninInferenceProvider, soactiveHwTypesresets and legend toggles are not filtered by the Agentic comparability guard. Engine conflict toasts are suppressed while a preview is loaded.Scope transitions in
ScatterGraphandChartDisplaytreat overlay scope changes as preview-only, wait outloadingwith empty official graphs before committinglocalOfficialOverride, and seed selections from the full eligible official scope instead of production-filteredactiveHwTypes. Official-only charts no longer get stuck ignoring legend toggles after a scope key change.Dismissal: when overlay data is removed, a
useLayoutEffectstrips leftover D3.unofficial-overlay-ptand.overlay-roofline-pathnodes.Cypress and unit tests cover delayed official fetch, table/chart sync, and overlay dismissal.
Reviewed by Cursor Bugbot for commit 4d5f607. Bugbot is set up for automated code reviews on this repo. Configure here.