-
Notifications
You must be signed in to change notification settings - Fork 350
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] CNN version of MultiAgentMLP #1479
Conversation
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.
This is incredible work, thanks so much! I was actually in need of a model like this.
I left some comments, but after those are addressed we should be there!
also make sure you format the files and lint them. |
Thank you for the review. I have updated the changes requested. |
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.
LGTM thanks for this
@vmoens can you have a pass?
@vmoens I’m considering merging this as is and do the refactoring to vmap in a second time as in #1497, would that work for you? Unless @MarkHaoxiang wants to take care of it? |
@matteobettini Have you started implementing the common multiagent nn module? If not I'll take a shot at it this week. |
Nope, yo can take a shot! So what we want is to do the exact same things but using vmap like #1497 (see that pr for context) |
@MarkHaoxiang we are posticipating that refactoring a bit to wait for some features, so we can go ahead with this as is. |
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.
Great work! A couple of comments regarding formatting
Tests are not passing, presumably because we moved the scripts from .circleci to .github for the CI |
Co-authored-by: Vincent Moens <[email protected]>
Co-authored-by: Vincent Moens <[email protected]>
Co-authored-by: Vincent Moens <[email protected]>
Co-authored-by: Vincent Moens <[email protected]>
Co-authored-by: Vincent Moens <[email protected]>
Co-authored-by: Vincent Moens <[email protected]>
Thanks for the check - I've adjusted the formatting as requested |
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.
Almost there!
Co-authored-by: Vincent Moens <[email protected]>
Co-authored-by: Vincent Moens <[email protected]>
Co-authored-by: Vincent Moens <[email protected]>
Co-authored-by: Vincent Moens <[email protected]>
Co-authored-by: Vincent Moens <[email protected]>
Co-authored-by: Vincent Moens <[email protected]>
Co-authored-by: Vincent Moens <[email protected]>
Co-authored-by: Vincent Moens <[email protected]>
CNN tests are failing |
Fixed a bug with reshaping the tensor step in the centralised/parameter sharing case.
@matteobettini whats the motivation behind expanding the tensor like this (for the MLP version) compared to
|
They seem equivalent, but in the first case the view acts as an implicit assert on the shape, so it is more readable in my opinion. |
What was the problem with the previous way? Why was it a bug? EDIT: ah i see, when you broke it into multiline the modifications of each line was applied on different tensors i would still keep the view before to make sure |
Sure, I've changed both to use the multi-line version but with the view |
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.
LGTM! Thanks for this
Co-authored-by: Vincent Moens <[email protected]>
Description
Added a MultiAgentConvNet module, which wraps a ConvNet to work in the multiagent space.
Motivation and Context
This is an utility written for PettingZoo Multiagent environments which have pixel based observations.
Types of changes
What types of changes does your code introduce? Remove all that do not apply:
Checklist
Go over all the following points, and put an
x
in all the boxes that apply.If you are unsure about any of these, don't hesitate to ask. We are here to help!