Metaworld icon indicating copy to clipboard operation
Metaworld copied to clipboard

Replacing mujoco-py with pybind11-based mujoco bindings

Open ottofabian opened this issue 2 years ago • 3 comments

Recently, other big benchmark suites, such as OpenAI gym and DMC, switched to the new pybind11-based mujoco bindings. Since these bindings are made available in DeepMind's official mujoco repository, I expect that they will be properly maintained for quite a while. In addition, this makes installation easier for users as well as potentially allows for a larger user base and fewer issues related to the mujoco installation.

As MetaWorld uses its own MujocoEnv version, I suggest including something similar to the OpenAI gym repo to allow for a smooth transition and reproducibility of existing results. While I don't think this change is urgent, I think it is in the long term interest of both users and maintainers.

ottofabian avatar Jun 27 '22 07:06 ottofabian

Pros:

  • mujoco-py is unmaintained according to https://github.com/deepmind/mujoco#third-party-bindings
  • A copy of the MuJoCo library is provided as part of the package and does not need to be downloaded or installed separately.

Cons:

  • mujoco doesn't manage GLContext during rendering, it only provides GLContext API. metaworld need to manage GLContext by itself.

YouJiacheng avatar Aug 24 '22 17:08 YouJiacheng

I think I speak for all the maintainers when saying we definitely would love to do this, but we don't have the time.

If there is anyone who is inclined to do the update themselves that would be great!

avnishn avatar Aug 24 '22 18:08 avnishn

I can do the update, but I don't want to keep full compatibility with old API which requires a lot of boilerplate codes, especially given that gym recently removed the old render API.

YouJiacheng avatar Aug 24 '22 18:08 YouJiacheng

Is there any update on doing this?

I made an attempt to update the bindings. Right now all scripted policy tests pass, but I am not entirely confident that the update may change the behavior for some environments.

I am also inclined to drop compatibility with the old gym API in favor of new ones, but I am not sure what the decision from the maintainer is. I personally think we should consider just dropping support for old mujoco_py support (i.e., deprecate v1 and migrate v2 in-place or create v3 that uses the new mujoco bindings) as it would bring a lot of maintenance burden both for now and future. If people want to use the old environments they can also check out an old version of the repo.

ethanluoyc avatar Nov 22 '22 11:11 ethanluoyc

As Meta-World ownership has been transferred from the RLWorkGroup to Farama Foundation, I am closing this issue. This task is on our road map for Meta-World. Please join our Discord to stay up to date on this!

reginald-mclean avatar Feb 01 '23 15:02 reginald-mclean