-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Test: Child tasks have identical RNG streams after a testset in 1.10.0-beta2 #51255
Comments
This is solved by something like:
And then in Test use The question is: should this be what |
I found an example https://github.com/RelationalAI-oss/XUnit.jl/blob/1f422fa22c8f3f570691cd5737990c250f8074b1/test/base-tests.jl#L718-L736 that depends on |
This PR adds an optional field to the existing `Xoshiro` struct to be able to faithfully copy the task-local RNG state. Fixes #51255 Redo of #51271 Background context: #49110 added an additional state to the task-local RNG. However, before this PR `copy(default_rng())` did not include this extra state, causing subtle errors in `Test` where `copy(default_rng())` is assumed to contain the full task-local RNG state.
This PR adds an optional field to the existing `Xoshiro` struct to be able to faithfully copy the task-local RNG state. Fixes #51255 Redo of #51271 Background context: #49110 added an additional state to the task-local RNG. However, before this PR `copy(default_rng())` did not include this extra state, causing subtle errors in `Test` where `copy(default_rng())` is assumed to contain the full task-local RNG state.
This PR adds an optional field to the existing `Xoshiro` struct to be able to faithfully copy the task-local RNG state. Fixes #51255 Redo of #51271 Background context: #49110 added an additional state to the task-local RNG. However, before this PR `copy(default_rng())` did not include this extra state, causing subtle errors in `Test` where `copy(default_rng())` is assumed to contain the full task-local RNG state. (cherry picked from commit 41b41ab)
This PR adds an optional field to the existing `Xoshiro` struct to be able to faithfully copy the task-local RNG state. Fixes #51255 Redo of #51271 Background context: #49110 added an additional state to the task-local RNG. However, before this PR `copy(default_rng())` did not include this extra state, causing subtle errors in `Test` where `copy(default_rng())` is assumed to contain the full task-local RNG state. (cherry picked from commit 41b41ab)
Originally posted by @vtjnash in #51225 (comment)
Here is a MWE that works in 1.9 but fails in 1.10.
The text was updated successfully, but these errors were encountered: