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] Account for terminating data in SAC losses #2606

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

vmoens
Copy link
Contributor

@vmoens vmoens commented Nov 25, 2024

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Nov 25, 2024

🔗 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 Failure

As of commit 18bf7f5 with merge base d90b9e3 (image):

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.

vmoens added a commit that referenced this pull request Nov 25, 2024
ghstack-source-id: dc1870292786c262b4ab6a221b3afb551e0efb9b
Pull Request resolved: #2606
@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 Nov 25, 2024
@vmoens vmoens merged commit 18bf7f5 into gh/vmoens/49/base Nov 25, 2024
40 of 58 checks passed
vmoens added a commit that referenced this pull request Nov 25, 2024
ghstack-source-id: dc1870292786c262b4ab6a221b3afb551e0efb9b
Pull Request resolved: #2606
@vmoens vmoens deleted the gh/vmoens/49/head branch November 25, 2024 13:35
# 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)]
Copy link
Contributor

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

Copy link
Contributor Author

@vmoens vmoens Nov 25, 2024

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?

Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

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.

@vmoens vmoens added the bug Something isn't working label Nov 25, 2024
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants