-
Notifications
You must be signed in to change notification settings - Fork 672
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
Update ppo_pettingzoo_ma_atari.py #408
Open
elliottower
wants to merge
21
commits into
vwxyzjn:master
Choose a base branch
from
elliottower:patch-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+150
−118
Open
Changes from 9 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
d9b9b11
Update ppo_pettingzoo_ma_atari.py
elliottower edc79d6
Pre-commit
elliottower d39da5e
Update PZ version
elliottower 2b2dfce
Update Super
elliottower 6d37313
Run pre-commit --hook-stage manual --all-files
elliottower 0168986
run poetry lock --no-update to fix inconsistencies with versions
elliottower b7bffe9
re-run pre-commit with --hook-stage manual
elliottower 2c76bb1
Change torch.maximum to torch.logical_or for dones
elliottower 025f491
Use np.logical_or instead of torch (allows subtraction)
elliottower 09f7a7f
Merge remote-tracking branch 'upstream/master' into patch-1
elliottower 16e0764
Finish merge with upstream master
elliottower 928b7b3
Fix SuperSuit to most recent version
elliottower d7a2aa2
Fix SuperSuit version in poetry lockfile and tinyscaler in pettingzoo…
elliottower d77cca0
Fix pettingzoo-requirements export (pre-commit hooks)
elliottower afba4e8
Test updating pettingzoo to new version 1.24.3
elliottower 8671154
Update ma_atari to match regular atari (tyro, minor code style changes)
elliottower d2cf1a5
pre-commit
elliottower 981bc63
Revert accidentally changed files (zoo and ipynb, which randomly seem…
elliottower 454364d
Revert ipynb change
elliottower 06473b2
Update dead pettingzoo.ml links to Farama foundation links
elliottower 1b725cf
Update to newly release SuperSuit 3.9.2 (minor bugfixes but best to k…
elliottower File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I think there is bug here. We should still bootstrap if
next_truncation=True
:So
next_done=next_termination
anddones=terminations
(probs just use next_terminations and terminations directly e.g.nextnonterminal = 1.0 - next_termination
).To implement this correctly we also need access to
terminal_observation
frompettingzoo_env_to_vec_env_v1
since we need access to the true terminal obs and not the obs returned by the next restart (the case currently -- so we need infos to provide access to the terminal obs). I have a PR out for this . Then we can implement something like this to do correct bootstrapping for truncating/timeout.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.
Good catch @KaleabTessera would you be willing to update this branch with the changes? I can give you edit access, I currently have a lot of other obligations from work so don’t have much time for this
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.
Oh shoot it’s a patch-1 so I don’t know if you can be given access. But if you clone the repo you can make a new branch from this branch and make a new PR if it’s not possible to edit this branch? Or maybe make a PR to update this branch itself. Sorry I can’t help more
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.
FYI I am doing a refactor at #424 . Gonna try run a whole suite of benchmark soon.
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.
Oh okay cool, sorry I remember you gave access to the WandB thing but I've not had time to do it. Probably simplest if you do it anyways, so thanks for that. It may be interesting to compare performance with the AgileRL multi agent atari example https://docs.agilerl.com/en/latest/tutorials/pettingzoo/maddpg.html
I see the issue linked in that PR mentions timeout handling, is that the same as mentioned below with termination vs truncation? Anyways there's anything needed from PettingZoo or SuperSuit's end let me know.
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.
Btw, just as an update, the SuperSuit PR linked above has been merged. My only concern with this is that whatever bootstrapping behavior is done here should mirror what is done with the single agent PPO implementations, so this is a question for @vwxyzjn.
My inclination is to keep the logic as it currently is in this PR and address that bootstrapping issue in another PR (maybe @KaleabTessera is interested in doing that? I don't have a whole lot of time to look into it nor am I the best person to do it as I'm not an expert)