Speedup CI Test Workflow with Injection (In-Memory Replacements) - #452
Conversation
to see what results I'm gettinh
…ware into geometric_brownian_motion
There was a problem hiding this comment.
Pull request overview
This PR speeds up CI test workflows by adding explicit seed parameters to sampler instantiations throughout the test suite. This ensures reproducibility and determinism, which is critical for CI environments to produce consistent results across runs.
Key changes:
- Added
seed=7orseed=42parameters to discrete distribution constructors (DigitalNetB2,Lattice,IIDStdUniform, etc.) across all test files - Created new test files for plotting functions (
test_plot_and_stop.py) and financial option validation (test_financial_option_quick.py) - Added new utility scripts for math delimiter checking, typo fixing, and coverage reporting
- Updated notebook test infrastructure to use in-memory replacement patterns to speed up execution
Reviewed changes
Copilot reviewed 152 out of 162 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
test/test_true_measures.py |
Added seed=7 to all DigitalNetB2 constructors for deterministic test behavior |
test/test_stopping_criteria.py |
Added seed=7 to Lattice and IIDStdUniform constructors |
test/test_plot_and_stop.py |
New file testing plot projection and notebook stop utilities with fake matplotlib fixtures |
test/test_integrate.py |
Added seed=42 and seed=7 to various sampler constructors for reproducibility |
test/test_financial_option_quick.py |
New file with lightweight financial option payoff tests using custom sampler |
test/test_fast_transform_fallbacks.py |
New file testing fast transform functions and torch fallback exceptions |
test/test_discrete_distribs.py |
Added seed=7 to all discrete distribution constructors |
test/booktests/*.py |
Multiple files updated to use run_notebook() helper with parameter replacements for faster execution |
scripts/*.py |
New utility scripts for pytest xdist detection, math delimiter checking, typo fixes, and coverage combining |
qmcpy/**/*.py |
Code formatting improvements (black formatting) without functional changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 116 out of 119 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot open a new pull request to apply changes based on the comments in this thread |
|
@sou-cheng-choi I've opened a new pull request, #453, to work on those changes. Once the pull request is ready, I'll request review from you. |
…ng (#453) * Initial plan * Apply review comments: fix whitespace and simplify parameter Co-authored-by: sou-cheng-choi <18743024+sou-cheng-choi@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sou-cheng-choi <18743024+sou-cheng-choi@users.noreply.github.com>
I have continued to speed up notebook tests on all three platforms and achieved some successes --- Mac is taking less than 12 minutes to finish and Windows 22 minutes, for example:
https://github.com/QMCSoftware/QMCSoftware/actions/runs/2065652279