Skip to content
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

Random: make statistical uniform tests fail less often #52165

Merged
merged 3 commits into from
Feb 15, 2024

Conversation

rfourquet
Copy link
Member

We have a very basic test to check that a distribution might be uniform: all the sampled elements should be unique, under certain conditions. But these conditions allowed the tests to fail too often. So allow one collision if the probability of such an event is too high.

Fix #52156.

We have a very basic test to check that a distribution might be uniform:
all the sampled elements should be unique, under certain conditions.
But these conditions allowed the tests to fail too often.
So allow one collision if the probability of such an event is too high.

Fix #52156.
@rfourquet rfourquet added test This change adds or pertains to unit tests randomness Random number generation and the Random stdlib bugfix This change fixes an existing bug labels Nov 14, 2023
@ViralBShah
Copy link
Member

@rfourquet Should we try get this in?

@KristofferC KristofferC added the merge me PR is reviewed. Merge when all tests are passing label Feb 14, 2024
@IanButterworth IanButterworth merged commit 7fcf9c8 into master Feb 15, 2024
6 of 8 checks passed
@IanButterworth IanButterworth deleted the rf/rng-fix-uniform-test branch February 15, 2024 02:38
@oscardssmith oscardssmith removed the merge me PR is reviewed. Merge when all tests are passing label Feb 15, 2024
tecosaur pushed a commit to tecosaur/julia that referenced this pull request Mar 4, 2024
We have a very basic test to check that a distribution might be uniform:
all the sampled elements should be unique, under certain conditions. But
these conditions allowed the tests to fail too often. So allow one
collision if the probability of such an event is too high.

Fix JuliaLang#52156.

---------

Co-authored-by: Kristoffer Carlsson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug randomness Random number generation and the Random stdlib test This change adds or pertains to unit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ci: allunique test failure in Random
5 participants