-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DOC: add section on setting random number seeds #9123
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
Conversation
Minor remark FWIW, shouldn´t we promote fixing the PRNG seed in examples as well? I think that @NelleV (or maybe @choldgraf, I don´t remember clearly 🐑) did some work a while ago to ensure that 19680801 was used as the seed for the PRNGs in every files where a call to a random function was made (not only the test-related ones). Do we want to make this clear in the docs too? |
I think the samples are uniformly change but most of the tests are not (because it would require re-generating test images). I decided against mentioning the examples here as this is a section on tests. |
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.
Apart from what I think may be a typo, LGTM :).
doc/devel/testing.rst
Outdated
|
||
Random data can is a very convenient way to generate data for examples, | ||
however the randomness is problematic for testing (as the tests | ||
must be deterministic!). To work around this set the seed in the test. |
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.
"in the tests ?": typo or correct English?
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.
tweaked a bit. The seed needs to be set in each test, just just once.
Fair enough about restricting the mention to the tests in a doc section about testing. |
ad5450d
to
3833ff0
Compare
Document using 19680801 as the preferred random seed.