-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Now random stuff can receive, and use, a RandomState object #1348
base: main
Are you sure you want to change the base?
Now random stuff can receive, and use, a RandomState object #1348
Conversation
Standard library random replaced by numpy.random (sometimes adapted).
Current implementation will work incorrectly with python multiprocessing because each process wil use the same random seed. |
Hi @Dipet, I just pushed a simple modification that has a test specifically for the situation where the user wants to use the random state. Could you please give me another code example where this implementation will work incorrectly with python multiprocessing since it passes the original test? I never used albumentations before and I will start using it just because it seemed easier to implement the use of random states compared to torchvision transforms 😃 |
I've been using this modified version passing a Numpy RandomState object and it is super useful for reproducibility. Albumentations is amazing, and I love using it, so I am here offering my help. What else should I do to get it merged? |
Why was this closed? |
@jpcbertoldo, this PR is still alive and kicking 😄 |
Ah yes, I confused with #1377
inshallah! it's a major upgrade
Would it be possible to use |
Do you know if there's any issue open in numpy for this issue? I'm not sure because I don't know that much about parallelization, but could there be any hint in here? |
Everything is working, and I just merged the latest stuff from master, again. The problem was in the test itself because the test was not expecting something using a random state, but I fixed it long time ago. |
PROS:
CONS: