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.7.2) - Ornstein-Uhlenbeck parameters range specification feature and workflows improvement #465

Merged
merged 18 commits into from
Jan 20, 2025

Conversation

AlejandroCN7
Copy link
Member

@AlejandroCN7 AlejandroCN7 commented Jan 17, 2025

Description

The key changes involve allowing weather variability parameters to be specified as ranges. To configure this, a tuple of two values (minimum and maximum) is used instead of a single float. For each episode, a random value is sampled from the specified range, enabling more dynamic and varied simulations that better capture the inherent unpredictability of climate systems. The exact parameters used for each episode are saved in a JSON file for reference.

Another significant update has been made in the final code validation phase. Relying on GitHub Actions to check or modify code with tools like autopep8 or isort can be problematic since they may not use the exact same versions as those defined within the project. To address this, we have replaced these actions with Poetry-managed installations to ensure precise version alignment with the production environment.

Some minor fixes have been done too. For more informarion, see the changelog.

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:

  • Fix weather noise configuration in scripts/train_agent.py.
  • Environment: Env can accept ranges in OU parameters specification for each weather variable, update docstring.
  • Environment: Added weather variability specification checker.
  • Modeling: Detect ranges in OU parameters and select a random value before to start OU process.
  • Modeling: Save the exact OU configuration for each episode.
  • Documentation: Update copyright to 2025.
  • Documentation: Added information about ranges in OU parameters (environments section).
  • Tests: Fix some tau values in common and wrapper tests.
  • Test: Check creation of weather noise file configuration in modeling.
  • Tests: Added asserts for weather noise exceptions.
  • Add cov.xml to gitignore.
  • Documentation: Add test coverage section in tests chapter.
  • Workflow improvement: Setup Python before Poetry installation.
  • Workflow fix: Stop ussing github actions for autopep8 and isort. Instead, using the exact version of the project.

@AlejandroCN7 AlejandroCN7 changed the title (v3.7.2) - Ornstein-Uhlenbeck parameters range specification feature (v3.7.2) - Ornstein-Uhlenbeck parameters range specification feature and workflows improvement Jan 20, 2025
@AlejandroCN7 AlejandroCN7 merged commit 445e3a6 into main Jan 20, 2025
5 checks passed
@AlejandroCN7 AlejandroCN7 deleted the feat/ou-noise-range branch January 20, 2025 10:28
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