-
Notifications
You must be signed in to change notification settings - Fork 1.2k
4569 consistent rng for data loader #5067
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
Conversation
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
d6f4bae
to
4429ffc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update, looks good to me.
/build |
@wyli, this breaks any scenarios where the user has set up their RNG on their pipeline ahead of time. I understand the need for such a mechanism but I suggest reassessing it and looking at ways of making it opt-in |
it's possible to use a predefined RNG as a keyword argument MONAI/tests/test_integration_lazy_samples.py Lines 106 to 110 in 9ee1b37
|
That only works for scenarios where the RNG hasn't already been set up. I definitely think that there needs to be an option where it just doesn't alter the pipeline random state. In my case, I have added a suppress_rng flag just to get around the problem for the LR paper; it might be a good way to go if we make it a little bit semantically clearer what this flag is for, but is there a reason why the whole mechanism isn't opt-in? |
Signed-off-by: Wenqi Li [email protected]
Fixes #4569
Description
with different
num_workers
the batch sampler's rng should be consistent, this PR keeps the initial random seed to achieve it.Status
Ready
Types of changes
./runtests.sh -f -u --net --coverage
../runtests.sh --quick --unittests --disttests
.make html
command in thedocs/
folder.