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

Feat: unified gae #1129

Merged
merged 20 commits into from
Jan 7, 2025
Merged

Feat: unified gae #1129

merged 20 commits into from
Jan 7, 2025

Conversation

SimonDuToit
Copy link
Contributor

@SimonDuToit SimonDuToit commented Nov 7, 2024

Makes all PPO systems use a single shared function for calculating the GAE (#1118 ). This is made possible by making the feed forward systems use the dones from the previous step, bringing them in line with the recurrent systems.
Benchmark results:

Copy link
Contributor

@sash-a sash-a left a comment

Choose a reason for hiding this comment

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

Looks much nicer! Just some minor nitpicks. Of course we should wait for the final benchmarks, but if that's all good them I'm happy.

Please make an issue for doing this to sable/mat unless you're planning on doing this now (which would be great)

mava/utils/gae.py Outdated Show resolved Hide resolved
mava/utils/gae.py Outdated Show resolved Hide resolved
mava/utils/gae.py Outdated Show resolved Hide resolved
mava/utils/gae.py Outdated Show resolved Hide resolved
mava/utils/gae.py Outdated Show resolved Hide resolved
Copy link
Contributor

@sash-a sash-a left a comment

Choose a reason for hiding this comment

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

My bad, should be N instead of A for number of agents

mava/utils/multistep.py Outdated Show resolved Hide resolved
mava/utils/multistep.py Outdated Show resolved Hide resolved
SimonDuToit and others added 2 commits November 8, 2024 11:37
Co-authored-by: Sasha Abramowitz <reallysasha@gmail.com>
Co-authored-by: Sasha Abramowitz <reallysasha@gmail.com>
@OmaymaMahjoub OmaymaMahjoub added benchmark required Docker images get pushed if PR has this label. benchmark complete and removed benchmark required Docker images get pushed if PR has this label. labels Nov 13, 2024
Copy link
Contributor

@OmaymaMahjoub OmaymaMahjoub left a comment

Choose a reason for hiding this comment

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

@SimonDuToit if you can update MAT and Sable to use gae from this util file 🙏

Copy link
Contributor

@OmaymaMahjoub OmaymaMahjoub left a comment

Choose a reason for hiding this comment

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

Thanks @SimonDuToit for the changes, just if you can fix the format and type issues that i mentioned 🙏

mava/utils/multistep.py Show resolved Hide resolved
mava/systems/ppo/types.py Show resolved Hide resolved
OmaymaMahjoub
OmaymaMahjoub previously approved these changes Dec 3, 2024
Copy link
Contributor

@OmaymaMahjoub OmaymaMahjoub left a comment

Choose a reason for hiding this comment

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

Thanks @SimonDuToit 🔥

Copy link
Contributor

@OmaymaMahjoub OmaymaMahjoub left a comment

Choose a reason for hiding this comment

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

LGTM! 🏅

Copy link
Contributor

@sash-a sash-a left a comment

Choose a reason for hiding this comment

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

Had a look at the results and seems like there's no regression! 🔥

@sash-a sash-a merged commit c92fe18 into develop Jan 7, 2025
4 checks passed
@sash-a sash-a deleted the feat/unified-gae branch January 7, 2025 13:22
sash-a added a commit that referenced this pull request Jan 10, 2025
* unified gae

* fixes

* pre-commit

* requested changes

* Replace A with N (number of agents)

Co-authored-by: Sasha Abramowitz <reallysasha@gmail.com>

* same

Co-authored-by: Sasha Abramowitz <reallysasha@gmail.com>

* cleaning

* undo mistake

* more cleaning

* merge conflicts

* uncapitalize advantage comments

---------

Co-authored-by: Sasha Abramowitz <reallysasha@gmail.com>
Co-authored-by: Omayma Mahjoub <omaymamahjoub98@gmail.com>
sash-a added a commit that referenced this pull request Jan 10, 2025
* unified gae

* fixes

* pre-commit

* requested changes

* Replace A with N (number of agents)

Co-authored-by: Sasha Abramowitz <reallysasha@gmail.com>

* same

Co-authored-by: Sasha Abramowitz <reallysasha@gmail.com>

* cleaning

* undo mistake

* more cleaning

* merge conflicts

* uncapitalize advantage comments

---------

Co-authored-by: Sasha Abramowitz <reallysasha@gmail.com>
Co-authored-by: Omayma Mahjoub <omaymamahjoub98@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants