ci: replace the flaky absolute perf gate with a same-run A/B gate - #193
Merged
Merged
Conversation
The nightly perf-regression gate failed about every other day (#162): it timed a 0.39s workload with median-of-3 and no warmup, then compared the result against a baseline recorded on a different machine and restored from an actions/cache entry that the update_baseline input could never overwrite. benchmarks/cleanbench/ab.py measures a base and a head checkout on the same runner. Each measurement runs in a fresh worker subprocess with that side's src first on PYTHONPATH (the worker refuses to run if freshdata came from elsewhere). Sides alternate order across pairs; runtime compares the fastest run per side, memory the median cold-clean peak RSS delta. A breach only fails when a full confirmation re-run breaches the same metric. perf-regression.yml now runs it for PRs touching src/ or the harness (base = PR base commit), daily on main (base = main ~26h earlier, alert issue on failure) and weekly against the latest release tag (report only), with a manual base_ref / accept_regression dispatch.
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
FreshData benchmark report —
|
| fixture | n_rows | n_cols | p50 s | p95 s | peak MB | repair % | false-repair % | preserve % | trust | monotonic | export % |
|---|
Authored-code reduction (Metric 6)
kevincostner17
added a commit
that referenced
this pull request
Sep 14, 2026
- perf-regression.yml installs with -c constraints/ci.txt like the other gating jobs (left out of #194 to avoid conflicting with #193). - MissForest convergence converts with to_numpy(dtype="float64", na_value=np.nan): the same pandas < 2 masked-array conversion that #192 fixed in the streaming state. Adds a nullable Int16 MissForest test. - contributor-roadmap.md no longer advertises #33 and #31, which are resolved; it points at the good-first-issue label instead.
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.
Addresses #162.
Summary
The nightly Performance regression workflow has failed roughly every other day, most recently with
GATE FAIL: runtime slowdown 0.2701 > 20% vs baseline. It wasn't catching regressions; it was measuring noise:runner.py:84-92).baseline_v1.json, recorded once on a different machine (a Mac).actions/cacheentry overrode the committed baseline. A cache key can never be overwritten, so theupdate_baselinere-pin input silently did nothing.New gate:
python -m benchmarks.cleanbench.abBase and head are measured in the same job, on the same runner, and gated on their ratio:
PYTHONPATHputs that side'ssrcfirst. The harness and T5 fixture always come from HEAD, and the worker exits with an error iffreshdatawas imported from anywhere else.FULL_GATE_RUNTIME_SLOWDOWN20%,FULL_GATE_MEMORY_OVERHEAD15%) triggers a full re-measurement. A metric fails only if it breaches both times.latest.ab.jsonand appends a markdown table to the job summary.Workflow (
perf-regression.yml)pull_requesttouchingsrc/freshdata/**,benchmarks/cleanbench/**or this workflowmainas of ~26h earlier; skipped when unchangednightly-failurealert issuev*release tagworkflow_dispatchbase_refinputaccept_regressioninput switches to report onlyAlso:
fetch-depth: 0, so base commits and tags resolve.actions/cachebaseline step is removed.env:.run_t5andbaseline_v1.jsonstay as they are forcleanbench-fullreporting.Verification
New
tests/test_cleanbench_ab.py(12 tests), which covers:src, and refuses asrcwithout itAll 12 pass on Python 3.12 / pandas 2.3.3 and on Python 3.9 / pandas 1.5.3.
ruff checkis clean.Real local run, base
8a9394cvs this branch at 200k rows with 3 pairs: runtime+1.1%, peak RSS delta32.9 MiBvs32.9 MiB(+0.1%), PASS, about 20s total.I'll close #162 once the new gate has been green for a week of scheduled runs.