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.3.1) - Sinergym observation normalization improved #408

Merged
merged 10 commits into from
Apr 22, 2024

Conversation

AlejandroCN7
Copy link
Member

Description

The normalization wrapper in Sinergym, based on the default Gymnasium wrapper, has encountered a functionality issue.

When a model is trained using this normalization, the calibration is lost post-process. Consequently, when the model is loaded for evaluation, the absence of normalization calibration results in poor agent performance.

Motivation and Context

This PR records the averages and deviations updated during this process, and offer the ability to load them either in the constructor or via a method to use it in evaluation tasks. These evaluations are configurable, whose normalization calibrations can be not updated during that process.

  • I have raised an issue to propose this change (required for new features and bug fixes)

Why is this change required? What problem does it solve? Please, reference issue or issues opened previously.

Fixes #407

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:

  • Updated NormalizeObservation wrapper with this new functionality.
  • Added documentation and API reference explaining the new features.
  • New tests for this wrapper have been designed and developed.
  • Updated training and loading DRL models scripts to use the new features.
  • Added warning in notebook example.

Extra:

@AlejandroCN7 AlejandroCN7 merged commit 9dc5a90 into main Apr 22, 2024
5 checks passed
@AlejandroCN7 AlejandroCN7 deleted the feat/issue-407 branch April 22, 2024 13:37
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.

[Feature]: Activation and deactivation of normalization calibration
1 participant