Farama-Foundation / Gymnasium

An API standard for single-agent reinforcement learning environments, with popular reference environments and related utilities (formerly Gym)
https://gymnasium.farama.org
MIT License
7.43k stars 838 forks source link

[Proposal] Remove `mujoco-py` based environments at May 2025 #993

Open Kallinteris-Andreas opened 7 months ago

Kallinteris-Andreas commented 7 months ago

Proposal

mujoco-py is an old unmaintained version of MuJoCo bindings (mujoco is the new version), and its inclusion in the gymnasium project is causing some issues (the environments that still use that library are v2 and v3 of the MuJoCo environments).

At May 2022 the first mujoco based environments were released (Ant-v4 and other MuJoCo-v4 environments) and they have been a big improvement, but the old environments are still used for reproducibility of old experiments, so we are giving a 3-year period from the release of new environments (1 year after this post) for which we will still support them and include them in the repository, afterward they will be moved to a separate repository and will not be supported.

The mujoco-py environments are considered deprecated until their removal

Motivation

1) Cython>=3 is not supported with mujoco-py why restricts other libraries that can be used https://github.com/Farama-Foundation/Gymnasium/issues/921

Pitch

No response

Alternatives

There is the option to create a mujoco-py soft fork PyPI package that just update the build script, but i am choosing to not follow it as an economization of development time

https://github.com/openai/mujoco-py/pull/782

that being said if someone i willing to assist it might happen.

Additional context

Note this also applies https://robotics.farama.org/ environments

Checklist

pseudo-rnd-thoughts commented 7 months ago

While I think its a reasonable suggestion to move the mujoco-py environments into another repo such that users can still access them if necessary, gymnasium-robotics would be the most obvious location.

But I don't totally understand the issue for keeping them in the repo? The problem with cpython is a semi-permentant issue with mujoco-py no matter the location, therefore, this is more a problem for users than the repo imho.

The biggest motivation would be to encourage users to migrate to v4 / v5 through making them no longer part of the easy install

ReHoss commented 7 months ago

+1 since mujoco-py triggers exceptions like below:

Exception: 
You appear to be missing MuJoCo.  We expected to find the file here: /home/mpanchen/.mujoco/mujoco210

Also appearing in https://github.com/Farama-Foundation/Gymnasium/issues/896

RogerJL commented 5 months ago

Prior to release of 1.0 would be the perfect time to remove this - no API promises on alfa/beta... If someone needs backward compatibility they can use old git version of Gymnasium IMHO.

ffelten commented 4 weeks ago

Hey,

I think it might be worth to also look at not using a docker container for tests in the workflows after this is done. Might speed up the workflows quite significantly.