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

[BugFix] Add torch.no_grad() for rendering in multiagent PPO tutorial #1511

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

matteobettini
Copy link
Contributor

Fixes #1509

This PR adds torch.no_grad() for the suggested rendering code in the multiagent PPO tutorial.

This will not be needed in future VMAS versions where the simulator will automatically detach incoming gradients, but still this change helps to have no erra\ors in all vmas versions.

Signed-off-by: Matteo Bettini <matbet@meta.com>
@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 Sep 8, 2023
@vmoens vmoens added bug Something isn't working documentation Improvements or additions to documentation labels Sep 8, 2023
Copy link
Contributor

@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!

@vmoens vmoens merged commit c62781c into pytorch:main Sep 8, 2023
@matteobettini matteobettini deleted the fix_multiagent_tuto branch September 10, 2023 13:06
vmoens pushed a commit to hyerra/rl that referenced this pull request Oct 10, 2023
…al (pytorch#1511)

Signed-off-by: Matteo Bettini <matbet@meta.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 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.

[BUG]MARL PPO render fails in observation deepcopy
3 participants