Skip to content

Conversation

@Jonathanace
Copy link
Contributor

@Jonathanace Jonathanace commented Apr 7, 2024

Description

Changes the arguments for the _reset function in the MaskedEnv example in the documentation for the ActionMask transform, which solves the example throwing an error.

Motivation and Context

This change is required because the current example in the documentation throws TypeError: MaskedEnv._reset() got an unexpected keyword argument 'tensordict' when run. The new code fixes this issue.

Bug Report: #2059
close #2059

  • 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.

@pytorch-bot
Copy link

pytorch-bot bot commented Apr 7, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/rl/2060

Note: Links to docs will display an error until the docs builds have been completed.

❌ 5 New Failures, 18 Unrelated Failures

As of commit 49ab3a9 with merge base 2461eb2 (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@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 7, 2024
@Jonathanace Jonathanace changed the title Fix: Correct MaskedEnv Example in ActionMask Transform Documentation [Documentation] Correct MaskedEnv Example in ActionMask Transform Documentation Apr 7, 2024
Copy link
Collaborator

@vmoens vmoens left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

@vmoens vmoens added the documentation Improvements or additions to documentation label Apr 7, 2024
@vmoens vmoens merged commit f85da4c into pytorch:main Apr 7, 2024
vmoens pushed a commit that referenced this pull request Apr 7, 2024
vmoens pushed a commit that referenced this pull request Apr 7, 2024
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. documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants