Repository navigation
Run selective contrib and reform tests one file per process - #10188
Merged
Merged
Conversation
Contributor
Author
|
US + core hub merge audit, us#10188 at
|
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.
What and why
Quick Feedback runs CRFB reform directory targets in one coverage-instrumented Core process. On #10066, run 38227190703 attempt 1 and attempt 2 each passed the first location's 5 Python tests, then ran
policyengine_us/tests/policy/contrib/crfbas one process collecting 43 cases. The runner received a shutdown signal 20m42s and 14m47s after that CRFB process started. Memory exhaustion is the likely cause; the shutdown logs do not prove OOM.All 22 Full Suite jobs, including all 9 contrib shards, succeeded. The successful CRFB shard ran its 8 files separately using
test_batched.py --mode per-file --workers 1, passing all 43 cases. Its largest recorded per-file RSS was 12,010 MB.The selective runner now reuses that batcher's per-file enumeration for selected directories under
tests/policy/contribandtests/policy/reform. It runs the resulting files sequentially, so only one file's model/reform caches remain resident at a time. This bounds memory by an individual file rather than a whole directory; memory within a file is unchanged. Both YAML suffixes and the Python tests previously discovered in those directories are retained. Changed-file mapping, selection limits, existing deferrals, and directly selected file targets are unchanged.Every child keeps the existing
coverage run -a --branchcommand and include patterns, accumulating coverage into the same data file. Failures still fail the overall run while later files execute. The workflow comment now describes the process isolation accurately; no jobs or concurrency were added.Test plan
changelog.d/.make format(Ruff 0.15.5): formatting and lint pass.policyengine_us/tests/code_health/test_selective_test_batches.py: 18 passed in 29.37s, using--noconftest --confcutdir=policyengine_us/tests/code_healthto skip unrelated country-package setup (one temporary-directory cleanup warning).policyengine_us/tests/core/test_run_selective_tests.py: 18 passed in 15.14s. An untracked local namespace adapter loaded the actual runner through its package import without initializing the country model; test contents were unchanged.Both files ran sequentially with
OMP_NUM_THREADS=4 OPENBLAS_NUM_THREADS=4 MKL_NUM_THREADS=4 VECLIB_MAXIMUM_THREADS=4 NUMEXPR_NUM_THREADS=4 OMP_WAIT_POLICY=PASSIVE. The supplied local environment lacked coverage, so it was installed into an untracked workspace-only dependency directory for these checks.The new tooling tests record subprocess commands and use temporary files; they do not construct simulations or load datasets. The standalone CLI smoke check also guards against importing the US model in the parent runner.
Hub microsimulation impact
Structurally zero. The PR changes only CI test routing:
.github/workflows/pr.yaml(comments),policyengine_us/tests/run_selective_tests.py, a code-health test and a changelog fragment. No variable, parameter, reform or dataset changes, so no microsimulation output can move.axiom: n/a: CI test routing