Fix NumPy 2.0 compatibility and set Gymnasium version >=1.0.0 - #140
Open
TimSchneider42 wants to merge 6 commits into
Open
Fix NumPy 2.0 compatibility and set Gymnasium version >=1.0.0#140TimSchneider42 wants to merge 6 commits into
TimSchneider42 wants to merge 6 commits into
Conversation
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.
Collaborator
|
Thank you for the PR @TimSchneider42 |
Author
|
Don't worry, take your time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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