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

(v2.2.5) - Multi-Objective Reward compability in Sinergym #303

Merged
merged 15 commits into from
Mar 10, 2023

Conversation

AlejandroCN7
Copy link
Member

@AlejandroCN7 AlejandroCN7 commented Mar 9, 2023

Description

In order to be compatible with MORL, this PR proposes a wrapper that will return a vector with reward components instead of a scalar value.

Motivation and Context

We are interested in enabling the use of MORL algorithms within Sinergym. This involves some minor changes and enhancements such as logger update (see changelog).

  • 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 #301

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:

  • Update version from 2.2.4 to 2.2.5.
  • Updated reward terms dictionary in rewards.py.
  • Improved info dictionary return un env layer (return reward and all reward terms automatically, no matter reward class used).
  • Added MultiObjectiveReward in wrappers.py.
  • Enhanced Sinergym logger: Using info for reward information in order to be more general.
  • Fixed logger wrapper according to CSVLogger update.
  • Added timestep (value 0) and time_elapsed (value 0) in simulator info construction (reset method).
  • Updated fixture and test in order to cover this new functionality.
  • Added documentation and notebook information.

@AlejandroCN7 AlejandroCN7 marked this pull request as ready for review March 10, 2023 10:48
@AlejandroCN7 AlejandroCN7 merged commit f33f130 into main Mar 10, 2023
@AlejandroCN7 AlejandroCN7 deleted the feat/issue-301 branch March 10, 2023 10:49
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]: Multi-Objective Reward for environments
1 participant