Kaggle / Kaggle/kaggle-environments
Feature request: update from Gym to Gymnasium, PettingZoo version
- Dominant language
- JavaScript
- Stars
- 452
- Forks
- 190
- Avg merge
- 31m
- Merged PRs (30d)
- 2
Description
Hi, I was wondering if it would be possible for Kaggle environments to use gymnasium rather than gym? We would like to list this of [third party environments](https://gymnasium.farama.org/environments/third_party_environments/) for Gymnasium and PettingZoo, but are only adding environments which are compatible with current versions.
[Gymnasium](https://github.com/Farama-Foundation/Gymnasium) a maintained fork of openai gym and is designed as a drop-in replacement (`import gym` -> `import gymnasium as gym`). Beyond just bugfixes, many RL training libraries have also switched ([rllib](https://github.com/ray-project/ray/tree/master/rllib), [tianshou](https://github.com/thu-ml/tianshou), [CleanRL](https://github.com/vwxyzjn/cleanrl)), or are planning to switch ([stable-baselines3](https://github.com/DLR-RM/stable-baselines3/blob/e5deeed16efb57c34ccdcb14692439154d970527/docs/guide/install.rst#bleeding-edge-version)). It would be great if users could train agents on Habitat using the latest models and features from these libraries (e.g., scalable distributed training/model serving using [Ray](https://github.com/ray-project/ray)/[RLlib](https://github.com/ray-project/ray/tree/master/rllib)).
For information about upgrading and compatibility, see [migration guide](https://gymnasium.farama.org/content/migration-guide/) and [gym compatibility](https://gymnasium.farama.org/content/gym_compatibility/). The main difference is the API has switched to returning `truncated` and `terminated`, rather than `done`, in order to give more information and mitigate edge case issues (for example, many popular tutorials/implementations of Q learning using gym were actually incorrect because of `done`, there will be an upcoming blog post explaining more details about this on the Farama site (https://farama.org/blog).
The update to gymnasium should not be too difficult, after that is done it should be relatively simple to update to the most recent Pettingzoo version as well, as it involves the same changes from `done` to `truncated` and `terminated`. We don't have the bandwith to contribute PRs updating every third party environment but I am happy to help with questions/review code, and can direct new Gymnasium/PettingZoo contributors to this if it's not able to be fixed.
Contributor guide
Research direction
Start with the Gymnasium migration guide and gym compatibility guidance linked in the issue, then audit the repository's Kaggle environment integrations for Gym and PettingZoo usage. Done means the supported environments work with current Gymnasium and PettingZoo APIs, including separate truncated and terminated results, with compatibility verified across the affected environments.
Written by the indexing model from the issue text.
Assessment
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100