Skip to content

Migrate gym to gymnasium#6309

Open
montplaisir wants to merge 4 commits into
developfrom
update-gymnasium
Open

Migrate gym to gymnasium#6309
montplaisir wants to merge 4 commits into
developfrom
update-gymnasium

Conversation

@montplaisir

@montplaisir montplaisir commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Proposed change(s)

Merge these PRs related to gymnasium:

Migrate from Gym to Gymnasium (gymnasium>=0.26.0)
Upgrade Pettingzoo to 1.24.0
Relax the dependencies for Numpy

Co-authored-by: @alexander-zap
Co-authored-by: @vadim0x60
Co-authored-by: @AmineAndam04
Co-authored-by: @Zach-Attach

Types of change(s)

  • Bug fix
  • New feature
  • Code refactor
  • Breaking change
  • Documentation update
  • Other (please describe)

Checklist

  • Added tests that prove my fix is effective or that my feature works
  • Updated the changelog (if applicable)
  • Updated the documentation (if applicable)
  • Updated the migration guide (if applicable)

@u-pr u-pr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Harness Review

Needs changes

The API migration is mostly coherent, but a few integration gaps remain: the new PettingZoo reset(seed=...) path does not actually seed anything, and some shipped examples/docs still target contracts this PR removes.

P2

The PettingZoo migration is incomplete across the published examples/docs. com.unity.ml-agents/Documentation~/Python-PettingZoo-API.md and ml-agents-envs/colabs/Colab_PettingZoo.ipynb still unpack env.last() as (observation, reward, done, info), while this PR changes the wrapper to return (observation, reward, terminated, truncated, info). The generated API doc also still advertises the old reset()/seed()/render(mode=...) surface. After this merges, users following the repo’s own guides will hit unpacking errors and try methods/signatures that no longer exist. Please update those docs/examples in the same change.

Reviewed commit e4ba566f

🤖 Helpful? 👍/👎

Comment thread ml-agents-envs/mlagents_envs/envs/unity_pettingzoo_base_env.py
Comment thread ml-agents-envs/setup.py
@montplaisir montplaisir requested a review from OliviaBayley July 3, 2026 20:22
@montplaisir montplaisir changed the title Update gym to gymnasium Migrate gym to gymnasium Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant