SofaDefrost / SofaGym

Machine Learning framework for Sofa
69 stars 10 forks source link

Transition from gym to gymnasium #9

Open hunoutl opened 1 year ago

hunoutl commented 1 year ago

There is no longer a team working on gym maintenance (previously openai).

The team that has been maintaining Gym since 2021 has moved all future development to Gymnasium, a drop in replacement for Gym (import gymnasium as gym), and this repo isn't planned to receive any future updates. Please consider switching over to Gymnasium as you're able to do so.

A transition to gymnasium will eventually be mandatory. So it's a good idea to start doing it. At first glance, switching from one library to another should be done without problems.

I make a try on GripperEnv and it worked. Some change where made in AbstractEnv.py (sofagym) to match the new gymnasium API. There are some warnings to warn about future changes to the API for the next gymnasium releases. I begun. Overall, the first changes (binding) bring new concept that I find rather practical. I continued with another environment and I was able to observe a side effect. I will continue to investigate and will gradually add the new environments under gymnasium.

hunoutl commented 1 year ago

Bonne remarque, aucune (en plus l'env n'est pas fonctionnel encore...) Je vais corriger et proposer l'ajout dans une autre PR

hunoutl commented 1 year ago

Stable Baseline3 can't be use with gymnasium (aka gym v0.26 or v0.27) for now. It's a big problem for RL community. Hopefully, there are working on it with this Pull Request. They put it forward on their documentation so I imagine that the merge will be for soon. The state of the PR seems to be able to run the basic gym envs, I will do tests for sofagym. If it doesn't work, I will do a PR only for gym v0.24 with sofa scenes corrected for sofa v22.12.

hugtalbot commented 1 year ago

Stable Baseline3 can't be use with gymnasium (aka gym v0.26 or v0.27) for now. It's a big problem for RL community. Hopefully, there are working on it with this Pull Request. They put it forward on their documentation so I imagine that the merge will be for soon. The state of the PR seems to be able to run the basic gym envs, I will do tests for sofagym. If it doesn't work, I will do a PR only for gym v0.24 with sofa scenes corrected for sofa v22.12.

Poke @scarponiv

hunoutl commented 1 year ago

News : PR : #1327 DOC : feat-gymnasium-support

alxbilger commented 1 year ago

News : PR : #1327 DOC : feat-gymnasium-support

Thanks @hunoutl. I got the news this week