Repository navigation
ci: add test duration tracking workflow - #4290
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
b8d8e85 to
4473112
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'MaxText Test Execution Times'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.15.
| Benchmark suite | Current: 83666c2 | Previous: 7b61908bf7e0a90e8b8a44b19d9cfa203ae308a6 | Ratio |
|---|---|---|---|
Total CPU-UNIT Tests Duration |
9845.751000000002 sec |
7476.170000000001 sec |
1.32 |
Total CPU-TORCH-REFERENCE Tests Duration |
283.71700000000004 sec |
246.48799999999994 sec |
1.15 |
This comment was automatically generated by workflow using github-action-benchmark.
18592d2 to
1069669
Compare
e07f763 to
03a5390
Compare
|
Hi @shralex,
To proceed, we see two main directions. How would you prefer we approach this? Option 1: Skip regression tracking for
|
9a73b96 to
a48af1f
Compare
a48af1f to
5c50977
Compare
fa54bf6 to
e19b445
Compare
e19b445 to
cd79c59
Compare
cd79c59 to
1bce10d
Compare
Description
This PR implements a comprehensive automated mechanism to detect and prevent test suite run-time inflation before code is merged into
main, addressing the need for a fast, reliable, and responsive CI pipeline.How the Workflow Works:
When a PR is opened or updated, the pipeline runs the standard test suites (CPU, GPU, TPU) and generates JUnit XML reports. Once those tests complete, the new
track_performancejob runs and does the following:enforce_test_limits.pyto parse the XML reports and ensures no individual test function regresses significantly compared to its stored baseline. The fine-grained baseline (per_test_baseline.json) is maintained directly on thegh-pagesbranch.parse_junit_to_benchmark.pyto aggregate the total runtime for each device. It then usesgithub-action-benchmarkto compare these aggregated total runtimes against the baseline stored on thegh-pagesbranch to prevent overall suite inflation.Changes Made:
Macro-Level Suite Tracking (
gh-pages):github-action-benchmarkto track macro-level execution times (suite/shard level).tests/utils/parse_junit_to_benchmark.pyto convert JUnit XML test results into the JSON format required by the benchmark action.gh-pagesbranch for historical trend visualization.Micro-Level Individual Test Tracking:
per_test_baseline.jsondictionary containing the execution times of individual test functions to thegh-pagesbranch.Regression Enforcement:
tests/utils/enforce_test_limits.pyto automatically flag and block any test that significantly regresses compared to its stored per-test baseline.Tests
github-action-benchmarkin CI.enforce_test_limits.pyin CI to ensure that test jitter thresholds are accurately tuned.Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.