-
Notifications
You must be signed in to change notification settings - Fork 313
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] Account for terminating data in SAC losses #2606
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/rl/2606
Note: Links to docs will display an error until the docs builds have been completed. ❌ 17 New Failures, 1 Unrelated FailureAs of commit 18bf7f5 with merge base d90b9e3 (): NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
ghstack-source-id: dc1870292786c262b4ab6a221b3afb551e0efb9b Pull Request resolved: #2606
ghstack-source-id: dc1870292786c262b4ab6a221b3afb551e0efb9b Pull Request resolved: #2606
# Check done state and avoid passing these to the actor | ||
done = next_tensordict.get(self.tensor_keys.done) | ||
if done is not None and done.any(): | ||
next_tensordict_select = next_tensordict[~done.squeeze(-1)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The done shape could be more extended than the batch shape, this line is breaking in multiagent settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then we need a test that covers this use case!
Can you draft one for me?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The SOTA ci picked up on this. Both SAC scripts are failing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah i didn't see (SOTA is broken bc of dreamer so I didn't check)
we should have tests that are not in SOTA, SOTA is there to test that scripts run smoothly, not features. The scripts are not part of the core lib - we can arbitrarily decide to ditch them, the rest of the lib should still work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I long wanted to make some tests for multiagent data in losses, will get to it when I have time.
Right now just crunching on writing thesis and satisfying BenchMARL users in free time.
Stack from ghstack (oldest at bottom):