Visitar URL original
Seed the delta SVM regression test by DresdenGman · Pull Request #688 · SALib/SALib · GitHub
Skip to content

Seed the delta SVM regression test - #688

Merged
ConnectedSystems merged 1 commit into
SALib:mainfrom
DresdenGman:bug_687
Sep 18, 2026
Merged

ConnectedSystems merged 1 commit into
SALib:mainfrom
DresdenGman:bug_687

Conversation

@DresdenGman

Copy link
Copy Markdown
Contributor

Closes #687.

Request the existing set_seed fixture in test_regression_delta_svm. The raw bootstrap in delta.bias_reduced_delta uses NumPy's legacy global RNG, so the unseeded test depended on random draws consumed by preceding tests.

This changes only the test's fixture dependency and adds an explanatory comment. The fixture's existing seed (123456), estimator, bootstrap count, expected values, and tolerances are unchanged. It is separate from the discrepancy-sampler fix in #685.

Validation on the current main base (aa2c554):

  • Python 3.10.20 / NumPy 2.2.6 / SciPy 1.15.3: 17 targeted tests passed.
  • Python 3.14.6 / NumPy 2.4.3 / SciPy 1.17.1: the same 17 tests passed.
  • Applying the fixture after two different ambient seeds produced identical estimates in the Python 3.14 environment.
  • Black 24.2.0, Ruff 0.3.0, and git diff --check passed.
python -m pytest -q tests/test_analyze_delta.py tests/test_regression.py::test_regression_delta_svm

These are targeted local checks, not a full-suite or cross-platform CI pass.

@ConnectedSystems
ConnectedSystems merged commit 6869261 into SALib:main Sep 18, 2026
4 of 5 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.

Delta SVM regression test depends on ambient NumPy random state

2 participants