ci(nightly): add force_baseline_update dispatch input for precision job - #30495
Merged
alisonshao merged 2 commits intoJul 8, 2026
Merged
Conversation
nightly-test-precision-8-gpu-h200 has been red since 2026-07-07 because PR sgl-project#29783 intentionally moved GLM-5.2's router GEMM output dtype bf16 -> fp32 (non-dsv4 DeepseekV2MoEGate branch). The ~1% accumulated residual-stream drift by layer 16 is an expected one-time numerical step, not a regression, but the test stores failed runs as pass_label="failed" and the baseline fetch skips those rows (precision_baseline_store._select_latest_run), so the rolling baseline can never self-heal from a failed run. The test already reads SGLANG_PRECISION_FORCE_UPDATE=1 to skip comparison and push a fresh pass_label="baseline_established" row; it just had no workflow surface to turn it on. Add a boolean workflow_dispatch input force_baseline_update (default false) and plumb it into the precision job env. Scheduled runs are unaffected: inputs.force_baseline_update is empty under cron, so the expression evaluates to '0' and normal comparison continues. After merge, dispatch once: gh workflow run nightly-test-nvidia.yml -f job_filter=nightly-test-precision-8-gpu-h200 -f force_baseline_update=true to dump post-sgl-project#29783 tensors as the new baseline; subsequent nightlies go green.
JustinTong0323
requested review from
Fridge003,
HaiShaw,
Kangyan-Zhou,
bingxche,
ispobock and
merrymercy
as code owners
July 8, 2026 07:34
Contributor
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
Collaborator
Author
|
/tag-and-rerun-ci |
Chronostasys
pushed a commit
to MindLab-Research/sglang
that referenced
this pull request
Aug 24, 2026
…te dispatch input for precision job (sgl-project#30495) (sgl-project#30566) Co-authored-by: Xinyuan Tong <115166877+JustinTong0323@users.noreply.github.com>
Chronostasys
pushed a commit
to MindLab-Research/sglang
that referenced
this pull request
Aug 24, 2026
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.
Problem
nightly-test-precision-8-gpu-h200has been red every night since 2026-07-07:non_intrusive__model.layers.16.inputs.1 rel_diff=0.009655330045 vs threshold 1e-3rel_diff=0.009655330366— deterministic drift against a frozen baseline.Only model:
zai-org/GLM-5.2-FP8(the suite's default, TP=8).Root cause — PR #29783 (intentional, not a regression)
#29783 ("Fixes for NVFP4 numerical accuracy for router GEMM output and wrong correction bias cast", merged 2026-07-06 20:53 UTC, merge commit
d8462f4961) changedDeepseekV2MoEGate.forwardinpython/sglang/srt/models/deepseek_v2.py. On the non-dsv4 CUDA branch, the router GEMM moved fromF.linear(hidden_states, self.weight)(bf16 output) tolinear_bf16_fp32(hidden_states, self.weight)(fp32 output) — a cuBLASbf16 x bf16 -> fp32GEMM:GLM-5.2 uses the noaux_tc gate, which takes exactly this branch, so the router-logits precision shift produces a ~1% accumulated residual-stream drift by layer 16. This is an expected, one-time numerical step from a correct accuracy fix — not a regression. The nightly baseline, however, was frozen pre-#29783, so every comparison since has blown past the 1e-3 threshold.
Why it can't self-heal
The baseline store (
python/sglang/test/precision_baseline_store.py::_select_latest_run) deliberately skips rows withpass_label="failed"— otherwise today's regressed tensors would be selected as tomorrow's reference and mask a real regression. So the threefailedruns uploaded on 07-07/07-08 can never become the next baseline. The job stays red every night until someone explicitly refreshes the baseline.The test already supports this:
SGLANG_PRECISION_FORCE_UPDATE=1skips the comparison and pushes today's tensors aspass_label="baseline_established"(test/registered/debug_utils/test_nightly_precision_regression.py:321,468-481). It just had no workflow surface to turn it on.Fix
Add a boolean
workflow_dispatchinputforce_baseline_update(defaultfalse) and plumb it into the precision job env:Scheduled runs are unaffected: under cron,
inputs.force_baseline_updateis empty, so the expression evaluates to'0'and normal comparison continues (the test parses== "1").Already verified — baseline refreshed on 2026-07-08
To unblock nightly without waiting for this PR to merge (the baseline lives in an external HF dataset, independent of the code repo), the branch was pushed to
sgl-project/sglangand dispatched once withforce_baseline_update=true(run 28926436428). Job log confirms the force path was taken:The HF baseline store (
sgl-project/sglang-nightly-precision-baselines) manifest now ends with abaseline_establishedrow (commit6a4673f, post-#29783), which is the newest non-failedrow and will be selected by_select_latest_run. The next scheduled nightly compares post-#29783 code against a post-#29783 baseline and goes green; rolling baseline updates resume.After merge
Once this PR merges, the
force_baseline_updateinput lives onmain's workflow, so future dtype/precision changes can be refreshed without pushing a temporary branch:Verification
pre-commit run --files .github/workflows/nightly-test-nvidia.ymlpasses (check-yaml, check-for-duplicate-workflow-job-names, codespell).mainHEAD (c9303a08da) contains Fixes for NVFP4 numerical accuracy for router GEMM output and wrong correction bias cast #29783 (d8462f4961).pass_label="baseline_established"and the store's fetch skipsfailedrows — both observed in the live dispatch above.CI States
Latest PR Test (Base): ✅ Run #28930922577
Latest PR Test (Extra): ❌ Run #28930922414