Skip to content

CI: pytest-xdist in every suite, real-mpirun tests rebalanced to the kvcache job; version 4.0.1 - #883

Merged
FileSystemGuy merged 2 commits into
mainfrom
ci-xdist-rebalance
Sep 23, 2026
Merged

FileSystemGuy merged 2 commits into
mainfrom
ci-xdist-rebalance

Conversation

@FileSystemGuy

Copy link
Copy Markdown
Contributor

CI wall-clock has crept up to about 3:45 per run. The critical path was the others job: its test step alone took 174s (main suite + package suite + vdb, serial), while the kvcache job finished a minute earlier. Two things were true that the layout did not exploit: four real-mpirun tests are 35% of the main suite when run serially (a fixed ~10s quiesce window each), and both heavy suites parallelize cleanly.

Changes

  • pytest-xdist added to the test extra (pyproject.toml, uv.lock). Every suite with more than a few seconds of work runs with -n auto (one worker per runner vCPU). No test code changed; both heavy suites were already xdist-clean.
  • Real-mpirun probe file moved next to kvcache. kvcache runs kv_cache_benchmark/tests then tests/integration/test_shared_fs_probe_real_mpi.py; others runs tests with that file --ignored, then mlpstorage_py/tests, then vdb_benchmark/tests. Every test still runs exactly once per workflow run; the comment in the workflow says so.
  • Version bumped 3.0.46 → 4.0.1 (pyproject.toml, uv.lock) — first release on the v4.0 line. RULES_EDITION stays 3.0 (tool releases never bump the edition; see Rules.md "Rules editions and comparability classes").

Measurements (this box, 4 workers = the runner's vCPU count)

Suite Serial -n 4
tests minus real-MPI ~75s 29s
real-MPI file (4 tests) 42s 11s
kv_cache_benchmark/tests 84–112s 28–38s
mlpstorage_py/tests 19s 18s (no gain; harmless)
vdb_benchmark/tests 1s serial, unchanged

Stability: kvcache and the real-MPI file each ran 3× under 4 workers, clean every time. One kvcache test (TestThreeTierEvictionCascade::test_demote_path_preserves_data) failed once earlier while this machine was running four serial pytest processes at once, and passed on every xdist run; noting it here as a test to watch if the kvcache job ever goes red.

Expected CI: both jobs' test steps land around 40–60s, so the run should be bounded by setup (checkout, apt OpenMPI, uv sync) plus about a minute, roughly 2:00 instead of 3:45.

Not in this PR

  • Caching (setup-uv enable-cache: true, apt) would trim the ~45–60s setup further.
  • The workflow comment about "2-vcpu runners" was stale (public-repo ubuntu-latest has 4); rewritten.

@FileSystemGuy
FileSystemGuy requested a review from a team September 23, 2026 22:17
@github-actions

Copy link
Copy Markdown

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@FileSystemGuy
FileSystemGuy merged commit ab2b2e9 into main Sep 23, 2026
4 checks passed
@FileSystemGuy
FileSystemGuy deleted the ci-xdist-rebalance branch September 23, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant