Skip to content

Speedup CI Test Workflow with Injection (In-Memory Replacements) - #452

Merged
sou-cheng-choi merged 283 commits into
developfrom
booktests_choi
Jan 2, 2026
Merged

Speedup CI Test Workflow with Injection (In-Memory Replacements)#452
sou-cheng-choi merged 283 commits into
developfrom
booktests_choi

Conversation

@sou-cheng-choi

@sou-cheng-choi sou-cheng-choi commented Jan 2, 2026

Copy link
Copy Markdown
Member

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

@sou-cheng-choi
sou-cheng-choi requested a review from Copilot January 2, 2026 11:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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=7 or seed=42 parameters 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.

@sou-cheng-choi
sou-cheng-choi changed the base branch from master to develop January 2, 2026 11:22
@sou-cheng-choi sou-cheng-choi changed the title Speedup CI Test Workflow Speedup CI Test Workflow with Injection Jan 2, 2026
@sou-cheng-choi
sou-cheng-choi requested a review from Copilot January 2, 2026 11:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread test/booktests/tb_qei_demo_for_blog.py Outdated
Comment thread test/booktests/tb_gbm_examples.py
Comment thread test/booktests/tb_ray_tracing.py Outdated
@sou-cheng-choi sou-cheng-choi changed the title Speedup CI Test Workflow with Injection Speedup CI Test Workflow with Injection (In-Memory Replacements) Jan 2, 2026
@sou-cheng-choi

Copy link
Copy Markdown
Member Author

@copilot open a new pull request to apply changes based on the comments in this thread

Copilot AI commented Jan 2, 2026

Copy link
Copy Markdown
Contributor

@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.

Copilot AI and others added 2 commits January 2, 2026 12:12
…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>
@sou-cheng-choi
sou-cheng-choi merged commit 2bcd8c9 into develop Jan 2, 2026
3 of 6 checks passed
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.

6 participants