Skip to content

Fix NumPy 2.0 compatibility and set Gymnasium version >=1.0.0 - #140

Open
TimSchneider42 wants to merge 6 commits into
automl:mainfrom
TimSchneider42:main
Open

Fix NumPy 2.0 compatibility and set Gymnasium version >=1.0.0#140
TimSchneider42 wants to merge 6 commits into
automl:mainfrom
TimSchneider42:main

Conversation

@TimSchneider42

Copy link
Copy Markdown

Hi,

First of all, awesome work! This is exactly what I have been looking for for my current project.

With this PR, I fixed numpy 2.0 compatibility in one place and also set the Gymnasium version to be >=1.0.0. It is possible that I missed something, as I really did not do much, but it works for me (is there any particular reason why it was kept below 1.0.0?). If there is anything more to do for this PR, let me know.

Also, I would appreciate it if a new release were pushed to PyPI once this PR is merged, so I can use it as a dependency.

In any case, thanks a lot!

Best,
Tim

np.in1d was removed in NumPy 2.0. np.isin is the recommended
replacement with identical functionality.
Gymnasium 1.0+ uses 'render_modes' instead of 'render.modes' in the
environment metadata dict. carl_pendulum.py already used the correct
key; this aligns the remaining 7 environment files.
- LunarLander-v2 was removed in gymnasium 1.0; v3 includes bug fixes
  for determinism and wind generation.
- Remove the <1.0.0 upper bound on gymnasium in both the base
  dependencies and the box2d optional dependency.
Gymnasium does not allow empty dictionaries. This updates CARLEnv to only
populate and include the "context" dictionary/space in observations and
states when context features actually exist.
@AndreBiedenkapp

Copy link
Copy Markdown
Collaborator

Thank you for the PR @TimSchneider42
Unfortunately it will take a while before I will get the time to properly review it (likely only after Easter)

@TimSchneider42

Copy link
Copy Markdown
Author

Don't worry, take your time

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.

2 participants