Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(v3.6.7) - Compability with Gymnasium 1.0.0 #456

Merged
merged 17 commits into from
Nov 13, 2024
Merged

Conversation

AlejandroCN7
Copy link
Member

Description

This update allows direct compatibility with the latest release of Gymnasium v1.0.0.

This version requires changes for compatibility with the other modules that generate optional or mandatory dependencies with Sinergym. Especially, Stable Baselines 3 and numpy, which is already handled correctly when installing the tool.

As Stable Baselines 3 already implements its synchronization with this version, but has not yet released, the main branch will be used directly. In future versions of Synergym, it will be modified when a release is created.

The new stable version of Gymnasium requires changes in some specifications. Some imports have been adapted, and the attribute query has been updated to avoid errors.

This update includes some additional enhancements, such as implementation improvement tasks and refinement to fix/debug warnings that have been appearing in the tool. For more details on these additional enhancements, check the changelog for a complete list.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (update in the documentation)
  • Improvement (of an existing feature)
  • Others

Checklist:

  • I've read the CONTRIBUTION guide (required)
  • My change requires a change to the documentation.
  • I have updated the tests.
  • I have updated the documentation accordingly.
  • I have reformatted the code using autopep8 second level aggressive.
  • I have reformatted the code using isort.
  • I have ensured cd docs && make spelling && make html pass (required if documentation has been updated.)
  • I have ensured pytest tests/ -vv pass. (required).
  • I have ensured pytype -d import-error sinergym/ pass. (required)

Changelog:

  • Delete autopep8 vscode extension.
  • Update gymnasium to 1.0.0, stable baselines 3 upgrade to master branch, downgrade numpy from 2.1.1 to 1.26.4 for compability.
  • Update poetry.lock.
  • Fix gymnasium RunningMeanStd import for the new version in wrappers.py.
  • Replace pkg_resources by importlib to avoid warnings (deprecated package).
  • Update common module check_env function to avoid unnecesary warnings.
  • Ignore epw.data submodule warning (don't exist).
  • Fix hasattr with env.has_wrapper_attr() to avoid errors in gymnasium v1.0.0, some attributes consult updated with get_wrapper_attr too.
  • Controllers module: Now RBCs return a numpy array action always intead of tuples (avoid gymnasium warnings).
  • Fix dataframe warning in cost wrapper.
  • Fix array casting warnings in discrete wrappers.
  • train_agent script: Deleted deprecated import gymnasium.
  • Delete wandb.require("core") from wandbLoggerWrapper since is used by default in new versions.
  • Fix some attribute calls (evaluation bug with gymnasium v1.0.0).

@AlejandroCN7 AlejandroCN7 merged commit 87e8def into main Nov 13, 2024
6 checks passed
@AlejandroCN7 AlejandroCN7 deleted the feat/gymnasium-1.0.0 branch November 13, 2024 15:47
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