Repository navigation
precheck: about 3x faster (parallel unit tests and example loads, no fixed sleeps, staged-file skips) - #2521
Merged
Conversation
…in parallel monitor_slurm_job.sh had two hardcoded 2 s sleeps that ignored MFC_MONITOR_POLL_SECONDS, which the tests set to 0; they cost ~45 s of the toolchain unit tests. Example validation now runs the case files (one interpreter each) side by side.
|
Claude Code Review Head SHA: f862c58 No review was produced. Claude ran but wrote no review (Claude step: failure). Run and transcript: https://github.com/MFlowCode/MFC/actions/runs/45903519917 |
… files cannot affect pytest-xdist runs the toolchain unit tests on up to 16 workers (~58 s -> ~20 s), in CI's lint as well. The doc reference check now runs in the background with the others instead of delaying them. The pre-commit hook passes --staged: a commit that stages nothing under examples/ or toolchain/ skips example validation, and a docs-only commit skips the unit tests (they read src/ and examples/ too). A plain ./mfc.sh precheck and CI run everything.
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.
Makes
./mfc.sh precheck, and so the pre-commit hook, about three times as fast.monitor_slurm_job.sh: the twosleep 2(output not yet visible; lettingtailflush) useMFC_MONITOR_POLL_SECONDStest_monitor_exit_codes.pyalone. In CI the waits go from 2 s to the 5 s poll interval./mfc.sh validatewith several cases loads them in a thread pool (up to 16)./mfc.sh lintruns pytest withpytest-xdist(-n auto --maxprocesses=16; new dependency inpyproject.toml)precheck --stagedexamples/ortoolchain/: example validation is skipped. Onlydocs/staged: the unit tests are skipped (they also readsrc/andexamples/, so a source commit still runs them). A plain./mfc.sh precheckand CI run everything1. Does it solve the problem?
Measured on a Frontier login node (shared, so ±a few seconds).
./mfc.sh prechecksrc/changedocs/change./mfc.sh validate examples/*/case.py2. Does it create another one?
./mfc.sh precheckpasses; 977 unit tests pass, three times in a row under xdistpyproject.tomlmakes each checkout reinstall its venv once3. Is it slower?
No: CI-script and toolchain only, no change to
src/or build flags. In CI, a monitored job's log ends ~3 s later.