-
Notifications
You must be signed in to change notification settings - Fork 313
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
MultiprocessingSampler is broken for tf #1494
Comments
I don't think I can solve this issue this week. Let's just not allow TF + MultiprocessingSampler for now. |
@krzentner @ryanjulian.
from multiprocessing import freeze_support
if __name__ == '__main__':
freeze_support() # https://docs.python.org/3/library/multiprocessing.html#multiprocessing.freeze_support
trpo_swimmer_ray_sampler(seed=100)
|
Yeah, unfortunately there's no way to "clear the graph." If you ever create a TF graph in a process, you can never fork in that process again. Modifying the launcher is also really unpleasant, especially because neither There is another option though: fork before the graph is created. This is tricky though. Optimally, we would only fork one process when |
Edit
examples/tf/trpo_swimmer/ray_sampler.py
to use MultiprocessingSampler and you will get:The text was updated successfully, but these errors were encountered: