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

[Feature] Make advantages compatible with Terminated, Truncated, Done #1581

Merged
merged 199 commits into from
Oct 2, 2023

Conversation

vmoens
Copy link
Contributor

@vmoens vmoens commented Sep 28, 2023

I manually tested that everything was working without truncated key for bc compatibility.
Not sure if we should test that things work if terminated is missing in all losses as it's very redundant and the cost tests are already very long.
I didn't include the truncated -> done fallback in the docstrings, maybe we should but I don't want to overload them.

Depends on #1539

@vmoens vmoens added the enhancement New feature or request label Sep 28, 2023
@vmoens vmoens marked this pull request as ready for review September 29, 2023 16:19
@matteobettini
Copy link
Contributor

Could you merge main?

@vmoens
Copy link
Contributor Author

vmoens commented Oct 1, 2023

You should be able to do it

@matteobettini
Copy link
Contributor

no, I can't
Screenshot 2023-10-02 at 08 37 25

Copy link
Contributor

@matteobettini matteobettini left a comment

Choose a reason for hiding this comment

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

Thanks for this!

Since there are so many changes, I ll do another pass when main is merged,

but for now here are some comments

torchrl/objectives/value/advantages.py Show resolved Hide resolved
torchrl/objectives/value/functional.py Outdated Show resolved Hide resolved
torchrl/objectives/value/functional.py Outdated Show resolved Hide resolved
torchrl/objectives/value/functional.py Show resolved Hide resolved
torchrl/objectives/value/functional.py Show resolved Hide resolved
@vmoens vmoens mentioned this pull request Oct 2, 2023
10 tasks
Copy link
Contributor

@matteobettini matteobettini left a comment

Choose a reason for hiding this comment

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

LGTM

examples/multiagent/maddpg_iddpg.py Show resolved Hide resolved
@vmoens vmoens merged commit 106368f into main Oct 2, 2023
53 of 59 checks passed
@vmoens vmoens deleted the truncated_vals branch October 2, 2023 13:47
vmoens added a commit to hyerra/rl that referenced this pull request Oct 10, 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