Skip to content
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

Clean out all of the local random number generators from the test #180

Closed
oxinabox opened this issue Apr 29, 2020 · 3 comments · Fixed by #181
Closed

Clean out all of the local random number generators from the test #180

oxinabox opened this issue Apr 29, 2020 · 3 comments · Fixed by #181
Assignees

Comments

@oxinabox
Copy link
Member

We should just use the global random number generator.
It is reseeded at the start of each testset.

This will simplify the testcode some what, which is always nice.

Should be an easy, though kind long, change to make.
just ralcing x = rand(rng, ...) with x=rand(...)
and deleting rng = MersenneTwister(...)

@willtebbutt
Copy link
Member

willtebbutt commented Apr 29, 2020

I think I initially objected to this (I'm the one who insisted on manually declaring randomness everywhere), but having gone over the explanation in the Test docs, I now agree with you Lyndon.

@oxinabox oxinabox transferred this issue from JuliaDiff/ChainRulesCore.jl Apr 29, 2020
@mattBrzezinski mattBrzezinski self-assigned this Apr 29, 2020
@mattBrzezinski
Copy link
Member

One small change needs to be made to ChainRulesTestUtils.jl to genereate_well_conditioned_matrix() to remove the rng as a param.

@oxinabox
Copy link
Member Author

oxinabox commented Apr 29, 2020

It should keep it but should default to using the global one if not provided.

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 a pull request may close this issue.

3 participants