-
Notifications
You must be signed in to change notification settings - Fork 30
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
Multiprocessing is slow #329
Comments
From the tests I did, it seems to be a conflict between python multiprocessing and pytorch multiprocessing. I just tried by replacing everything multiprocessing in AgentManager by joblib and there is no problem anymore, n_fit=4 is faster than 2 times n_fit=2. @omardrwch : why did you choose not to use joblib before ? It is a lot simpler to code, and I don't see why you would need multiprocessing instead. |
Hello! Actually, in the very first implementation of Another advantage of multiprocessing is that possibility of using We could maybe add a |
Another suggestion can be to use the multiprocessing subpackage of PyTorch (https://pytorch.org/docs/stable/multiprocessing.html#module-torch.multiprocessing) instead of the std one. Little document about multiprocessing best practices in Pytorch : https://pytorch.org/docs/stable/notes/multiprocessing.html |
Hi @omardrwch. I have been using From the To help illustrate this, I have uploaded a snapshot of the data I recorded. Thanks in advance. |
running "ltest_dqn_vs_mdqn_acrobot.py" with 10000 budget.
doing n_fit=4 is longer than 2* n_fit=2 when using parallelization="process"
TODO : add regression test 2fit faster than 2*1fit (with multiprocessing)
The text was updated successfully, but these errors were encountered: