-
-
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
Use StableRNGs for adapted_grid()
#169
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #169 +/- ##
==========================================
- Coverage 72.05% 62.15% -9.91%
==========================================
Files 7 6 -1
Lines 662 650 -12
==========================================
- Hits 477 404 -73
- Misses 185 246 +61 ☔ View full report in Codecov by Sentry. |
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.
Looks good to me, thanks!
I'm not sure about this yet. The master version always reset the RNG so the results are always consistent for same inputs. This may or may not, depending on how it's used. E.g. if you set I wonder if this could use a weaker factor instead, or if we should just make this a StableRNG in general. |
I'd say we do this, since we just need some random numbers. Possibly making the rand_factor a callsite argument, since people might be more interested to tweak that instead of the RN stream. |
Sounds good to me, and if you really want to give people the ability to try different seeds then you could also just make the seed itself a kwarg and then do |
adapted_grid()
adapted_grid()
Julia 1.11 changed something about random number generation which causes
rand(MersenneTwister(1337))
to return a different result from <1.11. This results in a different point selection inadapted_grid
and causes a test failure in Makie. Makingrng
a kwarg doesn't fix the difference between versions, but allows for other packages to use StableRNG if they care about consistency