4569 consistent rng for data loader#5067
Conversation
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
d6f4bae to
4429ffc
Compare
Nic-Ma
left a comment
There was a problem hiding this comment.
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 wenqil@nvidia.com
Fixes #4569
Description
with different
num_workersthe 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 htmlcommand in thedocs/folder.