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

Upgrade mujoco-py to 1.5+ #4

Closed
ryanjulian opened this issue Feb 28, 2018 · 3 comments
Closed

Upgrade mujoco-py to 1.5+ #4

ryanjulian opened this issue Feb 28, 2018 · 3 comments
Assignees
Labels
big big multi-feature projects housecleaning

Comments

@ryanjulian
Copy link
Owner

ryanjulian commented Feb 28, 2018

OpenAI maintains a python binding to the MuJoCo physics engine called mujoco-py. This library is a major dependency to rllab. Currently rllab uses an old, custom version of mujoco-py (0.5.7). This was done to avoid fixing small API changes between version upgrades to mujoco-py, but has also lead to rllab drifting away from the latest mujoco-py API and features.

This task is to add the latest version of mujoco-py to the rllab conda environment, and eliminate the older custom version (rllab.mujoco_py). We would also like to eliminate the special setup step of copying binaries to the vendor/mujoco directory (see rllab/scripts/setup_mujoco.py), and instead just use MuJoCo in its default install location (which is ~/.mujoco). There are breaking API changes from 0.5.7 to 1.5+, so this will require some refactoring and thorough testing.

Consider this a professional software engineering task, and provide a high-quality solution which does not break existing users, minimizes change, and is stable. It is your responsibility to ensure that your changes work for all rllab use cases, and install and work seamlessly from a clean system image. Test thoroughly and provide evidence of your testing (actual unit tests in tests/ are best, but not required). You must update all parts of the rllab codebase affected by your change. Please always use PEP8 style in your code, and format it using YAPF (with the PEP8 setting). Submit your pull request against the master branch of this repository.

Some notes:

  • For MuJoCo you will need a freely-available personal license from the MuJoCo website. You should apply for one right away, since it takes a couple of days to get approved.
  • Environments which use MuJoCo can be found in rllab/envs/mujoco. There is also a unit test in tests/envs/test_envs.py, but it should not be considered a complete test.
  • There are a couple bug fix commits (3ae055a and 6b7f6fb) on my private fork which get around flaws in mujoco-py 0.5.7. You should investigate and conclude whether these are still necessary with the new version.
  • 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 n_parallel > 1, which can change the execution behavior slightly. Test thoroughly and provide ei
  • 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.
@ryanjulian
Copy link
Owner Author

Note that the manual installation from source right now is a bit of a crutch and adds a lot of complexity. It should be installed using conda/pip.

@ryanjulian
Copy link
Owner Author

See openai/gym#638

@jonashen
Copy link
Collaborator

Let me know if my pull request has any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
big big multi-feature projects housecleaning
Projects
None yet
Development

No branches or pull requests

3 participants