[Numpy-discussion] NEP: Random Number Generator Policy (original) (raw)
Robert Kern robert.kern at gmail.com
Sun Jun 3 19:36:00 EDT 2018
- Previous message (by thread): [Numpy-discussion] NEP: Random Number Generator Policy
- Next message (by thread): [Numpy-discussion] NEP: Random Number Generator Policy
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, Jun 3, 2018 at 4:35 PM Eric Wieser <wieser.eric+numpy at gmail.com> wrote:
You make a bunch of good points refuting reproducible research as an argument for not changing the random number streams.
However, there’s a second use-case you don’t address - unit tests. For better or worse, downstream, or even our own <https://github.com/numpy/numpy/blob/c4813a9/numpy/core/tests/testmultiarray.py#L5093-L5108>, unit tests use a seeded random number generator as a shorthand to produce some arbirary array, and then hard-code the expected output in their tests. Breaking stream compatibility will break these tests. I don’t think writing tests in this way is particularly good idea, but unfortunately they do still exist. It would be good to address this use case in the NEP, even if the conclusion is just “changing the stream will break tests of this form”
I do! Search for "unit test" or "StableRandom". :-)
-- Robert Kern -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20180603/94af514a/attachment.html>
- Previous message (by thread): [Numpy-discussion] NEP: Random Number Generator Policy
- Next message (by thread): [Numpy-discussion] NEP: Random Number Generator Policy
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]