New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MAINT] Use rng fixture instead of check_random_state #4063
Conversation
Remi-Gau
commented
Oct 17, 2023
•
edited
edited
- closes use rng fixture #3926
👋 @Remi-Gau Thanks for creating a PR! Until this PR is ready for review, you can include the [WIP] tag in its title, or leave it as a github draft. Please make sure it is compliant with our contributing guidelines. In particular, be sure it checks the boxes listed below.
For new features:
For bug fixes:
We will review it as quick as possible, feel free to ping us with questions if needed. |
Codecov Report
@@ Coverage Diff @@
## main #4063 +/- ##
=======================================
Coverage 91.60% 91.60%
=======================================
Files 143 143
Lines 16072 16072
Branches 3339 3339
=======================================
Hits 14722 14722
Misses 804 804
Partials 546 546
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 4 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -443,12 +436,11 @@ def test_permuted_ols_with_covar_with_intercept_in_confonding_vars( | |||
|
|||
|
|||
def test_permuted_ols_with_multiple_constants_and_covars( | |||
design, random_state=RANDOM_STATE | |||
design, rng, random_state=RANDOM_STATE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need random_state here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let me double check if permuted_ols could directly accept the rng and not just a seed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I could remove this and also remove any use of RANDOM_STATE as a global in this test module.
But made realized the doc string of permuted_ols was not clear all types that random_state could take so I updated that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thx.