Skip to content

MNT: use reproducible RNG sequences in benchmarks#26638

Merged
charris merged 4 commits intonumpy:mainfrom
ngoldbaum:reproducible-benchmarks
Jun 7, 2024
Merged

MNT: use reproducible RNG sequences in benchmarks#26638
charris merged 4 commits intonumpy:mainfrom
ngoldbaum:reproducible-benchmarks

Conversation

@ngoldbaum
Copy link
Copy Markdown
Member

These three benchmarks aren't using seeded RNG sequences so the test data is not consistent from run to run. Using a seeded RandomState should fix that for these benchmarks.

Copy link
Copy Markdown
Member

@rkern rkern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the spirit of avoiding common seeds wherever possible for didactic reasons (and avoiding mostly-negligible but still niggling bias when reusing streams for different purposes), I've taken the liberty of assigning different 31-bit seeds.

Other than that (and it's truly optional), LGTM!

charris and others added 3 commits June 6, 2024 17:01
Co-authored-by: Robert Kern <robert.kern@gmail.com>
Co-authored-by: Robert Kern <robert.kern@gmail.com>
Co-authored-by: Robert Kern <robert.kern@gmail.com>
@charris charris merged commit 8d23615 into numpy:main Jun 7, 2024
@charris
Copy link
Copy Markdown
Member

charris commented Jun 7, 2024

Thanks Nathan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants