Skip to content
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

Asynchronous plotting for TensorFlow #1

Closed
ryanjulian opened this issue Feb 23, 2018 · 2 comments
Closed

Asynchronous plotting for TensorFlow #1

ryanjulian opened this issue Feb 23, 2018 · 2 comments
Assignees
Labels

Comments

@ryanjulian
Copy link
Owner

ryanjulian commented Feb 23, 2018

Task

Presently asynchronous plotting/3D rendering is not supported in the part of rllab based on TensorFlow (sandbox.rocky.tf), but it is supported in the rllab code which uses Theano.

This means that when you turn plotting on for a Theano training session, the plot does not block the training process. The TensorFlow implementation runs the rendering loop directly in the training algorithm (rather than a worker), so it blocks. This makes training using TensorFlow much slower than Theano when plotting is turned on (they are about the same without plotting).

TensorFlow's notion of a session makes this tricky. I'm not 100% sure that there is a solution. If you figure out that it is impossible, or requires rewriting large parts of the repository, email me with what you tried and some explanations why.

Current behavior
3D plotting with MuJoCo in TensorFlow is synchronous, blocks the training process.

Desired behavior
3D plotting with MuJoCo in TensorFlow is asynchronous and does not block the training process (just as with Theano)

Pointers to relevant source

Submission instructions

Fork this repository into you own Github account, and implement this feature in its own branch, based on the master branch. When you are done and would like a code review, send me an email with a link to your feature branch. DO NOT SUBMIT A PULL REQUEST TO THIS REPOSITORY.

Consider this a professional software engineering task, and provide a high-quality solution which does not break existing users, minimizes change, and is stable. Tests are welcome where appropriate. Please always use PEP8 style in your code, and format it using YAPF (with the PEP8 setting).

Notes

  • Testing the software requires a freely-available student license for MuJoCo available here. It takes a couple days to get approved, so do it early.
  • rllab has setup instructions at http://rllab.readthedocs.io
  • You can find examples of how to launch rllab in examples and sandbox/rocky/tf/launchers. Note that everything must run using the run_experiment_lite wrapper with the parameter n_parallel greater than 1 (this triggers multiprocess operation).
  • rllab currently has two parallel implementation of the neural network portions of the library. The original is written in Theano and is found in rllab/. The tree sandbox/rocky/tf re-implements classes from the original tree using TensorFlow, and is backwards-compatible with the Theano tree. We are working towards using only one NN library soon, but for now your implementation needs to work in both trees.
  • rllab is an upstream dependency to many projects, so it is important we do not break the existing APIs. Adding to APIs is fine as long as there is a good reason.
Repository owner deleted a comment from raymoss Apr 9, 2018
Repository owner locked as off-topic and limited conversation to collaborators Apr 9, 2018
@ryanjulian ryanjulian added this to the Week of May 21 milestone May 15, 2018
@jonashen
Copy link
Collaborator

jonashen commented Jun 7, 2018

Pull request here

@ryanjulian ryanjulian added this to the Week of June 4th milestone Jun 7, 2018
@ryanjulian
Copy link
Owner Author

See rlworkgroup/garage#22

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants