Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Feature] Target Return Transform#1045

Merged
vmoens merged 15 commits intopytorch:mainfrom
BY571:target_return_transform
Apr 20, 2023
Merged

[Feature] Target Return Transform#1045
vmoens merged 15 commits intopytorch:mainfrom
BY571:target_return_transform

Conversation

@BY571
Copy link
Contributor

@BY571 BY571 commented Apr 12, 2023

Description

Implements a transform that adds a user-defined target return to the tensordict.

Motivation and Context

For goal-conditioned RL you may want to specify a target return that the agent should achieve in one episode. This transform adds such a target return to the tensordict which can be then used as an additional input for the agent.
With the mode input, it offers the option to keep the target return constant during the whole episode or reduce reduce the target return at each step by the reward obtained.
This transform is useful for mentioned goal-conditioned RL but also Upside-Down RL or the Decision Transformer.

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

Types of changes

What types of changes does your code introduce? Remove all that do not apply:

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

Checklist

Go over all the following points, and put an x in all the boxes that apply.
If you are unsure about any of these, don't hesitate to ask. We are here to help!

  • I have read the CONTRIBUTION guide (required)
  • My change requires a change to the documentation.
  • I have updated the tests accordingly (required for a bug fix or a new feature).
  • I have updated the documentation accordingly.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 12, 2023
@vmoens vmoens added the enhancement New feature or request label Apr 12, 2023
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a ref?

@vmoens vmoens merged commit a59eca3 into pytorch:main Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments