Stabilize CI test runs with deterministic environment settings#314
Draft
harryswift01 wants to merge 16 commits intomainfrom
Draft
Stabilize CI test runs with deterministic environment settings#314harryswift01 wants to merge 16 commits intomainfrom
harryswift01 wants to merge 16 commits intomainfrom
Conversation
…le aliases - sort group IDs when building `group_id_to_index` to guarantee deterministic ordering - replace backwards-compatible aliases with copies to avoid shared mutable state - update unit tests to reflect deterministic behaviour - add determinism and aliasing tests to prevent regression
5f1aa03 to
313f038
Compare
…s in regression test
…nt reduction and update tests
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.
Summary
This PR resolves nondeterministic regression test failures by enforcing deterministic iteration, eliminating shared mutable state, and standardizing the CI execution environment. Parallel execution with pytest-xdist is preserved.
Changes
Deterministic data handling
groups.keys()withsorted(groups.keys())group_id_to_indexlist(...),.copy()) for force/torque accumulatorsDeterministic CI environment
OMP_NUM_THREADS=1MKL_NUM_THREADS=1OPENBLAS_NUM_THREADS=1NUMEXPR_NUM_THREADS=1PYTHONHASHSEED=0to ensure stable dictionary hashing and orderingStandardize test execution
-n auto) for performance--dist=loadscope) across all jobsCI consistency improvements
Root cause
The regression failures were caused by a combination of:
These issues manifested as intermittent failures, typically in later tests or when running in parallel.
Impact
Validation
PYTHONHASHSEED