-
Notifications
You must be signed in to change notification settings - Fork 31
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
Test using StableRNGs #55
Conversation
Codecov Report
@@ Coverage Diff @@
## master #55 +/- ##
=========================================
Coverage ? 92.45%
=========================================
Files ? 8
Lines ? 1113
Branches ? 0
=========================================
Hits ? 1029
Misses ? 84
Partials ? 0 Continue to review full report at Codecov.
|
Hi @andreasnoack, do you have time to review this one or should I just merge? |
Starting with Julia 1.5 random number generators are not guaranteed to provide the same sequence of numbers for a given seed (see here).
This PR replaced the global rng used in tests with a StableRNG called
testrng
and uses it everywhere.Turns out that was not enough because Lasso.jl has a RandomCoefficientIterator that uses its own RNG.
So to get deterministic test, I also add the ability to specify an
rng
in the call tofit(...; rng=StableRNG(123))
.Tests now seem to pass on 1.5.
Closes #48