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.3) - Normalization calibration improvement and load_agent.py fix #451

Merged
merged 5 commits into from
Oct 4, 2024

Conversation

AlejandroCN7
Copy link
Member

Description

This patch introduces two minor changes in Sinergym:

  • Fixed an issue in one of the scripts included in the repository (this does not affect the tool's functionality as it is just an example/functional script). The script was loading the model but, instead of using it to evaluate the agent, it used random behavior. The issue originated from a bad commit I made in version 3.5.5 of the tool.

  • Improved the calibration-saving system when using the normalization wrapper for observations. For better security, calibration states are now saved episode by episode in their respective folders. Additionally, these calibrations are saved and overwritten in the root of the output folder to track the latest valid calibrations.

  • For DRL evaluations using LoggerEvalCallback, these calibrations are saved each time the best model is updated, ensuring improved evaluation quality when using normalization.

  • The documentation has been updated with this information in the wrapper section.

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:

  • scripts/eval/load_agent.py: fix bug in example script (random agent loop instead of using loaded model).
  • Normalization calibration save: latest calibration saved in rootoutput folder and intermediate states in episode folders.
  • LoggerEvalCallback: Normalization calibration saved in evaluation folder (if normalization wrapper is applied).
  • Documentation: Indicate this changes in normalization wrapper

@AlejandroCN7 AlejandroCN7 merged commit 6397357 into main Oct 4, 2024
6 checks passed
@AlejandroCN7 AlejandroCN7 deleted the feat/evaluate-model branch October 4, 2024 09:27
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