Repository navigation
fix(ci): judge Activity decode overhead by an interval, not 5 pairs - #2553
Merged
Merged
Conversation
The Activity performance gate failed at random on changes that cannot touch decode: five alternating pairs scored by a bare median against a 2 percent budget, plus a baseline CV limit that mostly measured slow drift the alternation already cancels, cannot resolve 2 percent against a per-pair spread of several points. Each mode now samples alternating off/on pairs from 12 in steps of 2 up to 40 and judges the paired degradations by their median and a distribution-free 98% sign-test interval: investigate when the interval lies wholly above the 2 percent budget, within-target when it does not and its upper bound is at most 4 percent, otherwise more pairs, and inconclusive (measurement noise, not a slowdown) at the cap. Baseline CV and the paired range stay in the summary as diagnostics only. No leading pairs are discarded: 636 recorded runs show no first-pair or order bias. The constants live in webui/scripts/activity-performance-policy.json. The verifier re-derives every mode's verdict from the raw samples with a Python port and derives sample and preflight counts from paired_runs; the evidence summarizer checks each summary's internal consistency under the same policy. Both languages reproduce webui/scripts/activity-performance-fixtures.json bit for bit, seeded from the recorded logs of the runs named in the issue and its comments. Refs #1925
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
The Activity performance gate judged five alternating pairs by a bare median against the 2% budget and also failed any mode whose baseline CV exceeded 5%. On
lablup-dgxspark21the per-pair noise (SD 3.6 points, kurtosis 12 to 25) makes both rules fire on unchanged code. Each mode now samples until an interval decides, and a mode that cannot be decided fails as noise, not as a slowdown.The rule
(off - on) / off * 100, alternating order as before. Point estimate: the median. Interval: the distribution-free sign-test interval[x(k), x(n+1-k)]at 1% per tail (98% two-sided). It needs no variance estimate and no random bootstrap, so JavaScript and Python agree bit for bit.investigate(slowdown): the interval lies wholly above the 2% budget.within-target: it does not, and its upper bound is at most 4%.inconclusive, which fails with a message naming measurement noise.webui/scripts/activity-performance-policy.json. The verifier re-derives every mode from the raw samples with a Python port (scripts/webui/activity_performance_verdict.py) and derives the sample and preflight counts frompaired_runs. The summarizer has no samples, so it checks each summary's internal consistency under the same policy. Both languages are tested againstwebui/scripts/activity-performance-fixtures.json.Resampling estimate
Noise model: all 636 complete diagnostics artifacts on this runner (2026-09-15 to 2026-10-22, 6,360 pairs), centred on a true 0% change, iid pairs drawn from that pool plus a per-run shift N(0, 0.83^2). 0.83 is the between-run SD estimated from the post-#2119 runs; one-visible and two-visible means in the same run are uncorrelated (r = -0.07). 20,000 simulated runs per row, sequential looks included:
fullmode. With iid pairs and no run shift it is below 0.01%.investigate; keeping such shifts out is the job of the fix(ci): clean up the Activity gate server and score on a quiet host #1949 host-quiet precheck.Wall time
Measured per pair on 153 recent runs: one-visible 7.2 s median (7.7 s max), two-visible 8.4 s (9.2 s max), plus about 34 s before the first pair. In CI (visible-only-headed), the worst case at 40 pairs per mode is about 12 minutes, and the expected null run is about 4 minutes (about 2 today).
fullmode adds a hidden block, so its worst case is about 20 minutes, inside the 1800 s activity timeout.ci.ymltimeouts are unchanged.Fixture provenance
The fixture copies the per-sample logs of the
webui-activity-performance-diagnostics-Linuxartifacts, none of which had expired: 35423171315 a1, 35425297407 a1/a2/a3, 35425050365 a1, 35421166203 a1, 35567777700 a1 (#1944), 35588958676 a1 (#1946) and 38265665905 a1/a2 (#2279). At their recorded five pairs, every one of them returnscontinue(no verdict), neverinvestigate. Their concatenated pairs decidewithin-targetat 12 pairs in both modes. The same pairs with the Activity arm 6% slower decideinvestigate, and spread-amplified or drifting (CV 12%) variants exerciseinconclusiveand CV-only cases.Test plan
pnpm --dir webui run unitandpnpm --dir webui run lintmake verify-webui-helper-tests, including the newactivity_performance_verdict_tests.pypython3 scripts/webui/verify_activity_performance_tests.pyandsummarize_activity_evidence_tests.pymake verify-versions verify-env-var-docs verify-python-toolingWebUI installed artifactjob on this PR, run 39853154267: one-visible within-target (median -0.15%, 98% interval [-1.83%, 1.25%]) and two-visible within-target (median -0.76%, [-2.64%, 0.47%]), both at 12 pairs, with the verifier and summarizer accepting the evidence; the verifier took 3 min 42 s.Acceptance runs on
lablup-dgxspark21WebUI installed artifactruns of this tree (head a7cc03f): run 39853154267 attempts 1 to 5 (jobs 120084449655, 120097378392, 120110916929, 120116442394, 120121248222).investigatein both modes: run 39870659579 on throwaway draft PR test(ci): #1925 injected Activity slowdown red run (do not merge) #2554 (closed, never merged). one-visible median 4.58%, 98% interval [3.89%, 5.68%]; two-visible median 8.05%, interval [7.11%, 9.62%]; 12 pairs each. The injection sleeps 400 us per decode tick for each open/ui-api/v1/eventsstream, which the Activity page holds open exactly while visible.Closes #1925