[MNT] Diagnose and address long test runtimes (#1633)#1692
[MNT] Diagnose and address long test runtimes (#1633)#1692Abhishek9639 wants to merge 3 commits intoopenml:mainfrom
Conversation
geetu040
left a comment
There was a problem hiding this comment.
Thanks, scripts/profile_tests.sh file will be used, but I not sure about other duration and timeout related changes. See comments below.
|
you should mention the issue #1633 without the keyword |
|
@geetu040, |
|
@geetu040, |
- Add global per-test timeout (600s) to pytest config - CI: report all test durations (--durations=0) for diagnosis - CI: add explicit --timeout=600 to prevent hanging tests - Optimize verify_cache_state fixture: scope function -> module - Add scripts/profile_tests.sh for local duration profiling
…script - Revert CI workflow to original --durations=20 (no timeout) - Remove global timeout from pyproject.toml - Revert conftest.py verify_cache_state scope to function - Update profile_tests.sh: accept CLI args (-m, -d, -t, -o) with defaults
- Add -n flag for parallel workers (default: 4) - Add --dist=load to distribute tests across workers - Remove -q flag for full pytest output - Mimics exact pytest command used in CI
7114df4 to
144cee9
Compare
|
Is this ready for review or not?:) I was pinged for this but I see there are still commits being pushed |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1692 +/- ##
=======================================
Coverage 54.67% 54.67%
=======================================
Files 63 63
Lines 5108 5108
=======================================
Hits 2793 2793
Misses 2315 2315 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi @PGijsbers, |
[MNT] diagnose and address long test runtimes. Closes #1633
Changes
Current CI test runs take 1–2+ hours. This PR diagnoses the bottleneck and implements several improvements:
Root Cause
The
production_servertests (74 tests) make live API calls to openml.org, taking ~1h 23m in CI even with 4-worker parallelization.Improvements
Global per-test timeout (
pyproject.toml)timeout = 600(10 min) to[tool.pytest.ini_options]CI workflow improvements (
.github/workflows/test.yml)--durations=20→--durations=0to report ALL test durations for diagnosis--timeout=600to all 3 pytest invocationsFixture optimization (
tests/conftest.py)verify_cache_statefixture scope fromfunction→moduleBenchmark script (
scripts/profile_tests.sh)Test Distribution Analysis
production_servertest_serversklearn-onlyVerification