-
Notifications
You must be signed in to change notification settings - Fork 22.2k
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
Fix issue #7209 in DataLoader #7265
Conversation
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.
There's no randomness involved. Every time the workers will start, the state of their PRNGs will always be fully determined by 7054 + worker_nr
. Let's just move the base_seed
out of the if
statement. I can't see any issue with that.
@apaszke sorry I don't get your comment on "no randomness involved". Worker's PRNG is setup by a seed randomly picked between 0 and Similarly if Okay, I can change as you ask... |
Hmmm ok I think that could have worked, my bad. However, I still think that my solution is better, because yours assumes that you've forked the workers, and inherited the PRNG state from the main process, while in reality someone might be using the |
I see, thanks for pointing out on I changed the commit |
@apaszke I rechecked my scripts with |
@apaszke it is OK that it fails only on macosx ? |
Thanks @vfdev-5! |
Addresses the issue #7209