Skip to content

Commit 306d50e

Browse files
author
Jacob Garber
committed
Make random anoph testing data reproducible
The simulated data is generated randomly, but it needs to be reproducible after the fact for debugging if there is a failure in one of the test cases. This is done by generating a different global seed on each run, and then creating context-specific RNG's in every situation they are needed. The context is mixed into the seed of the RNG to ensure that all contexts will generate independent random numbers, but still be reproducible from the global seed. See https://numpy.org/doc/stable/reference/random/parallel.html#sequence-of-integer-seeds In order for reproducibility to work, it is essential to *not* use the python random library or any legacy numpy.random calls to generate data.
1 parent 27ac08c commit 306d50e

1 file changed

Lines changed: 215 additions & 115 deletions

File tree

0 commit comments

Comments
 (0)