Skip to content

MNT: use reproducible RNG sequences in benchmarks #26638

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

Merged
merged 4 commits into from
Jun 7, 2024

Conversation

ngoldbaum
Copy link
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
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
67 of 68 checks passed
@charris
Copy link
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