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/mava reproducibility and PZ wrapper fix #296

Merged
merged 12 commits into from
Aug 17, 2021

Conversation

KaleabTessera
Copy link
Contributor

@KaleabTessera KaleabTessera commented Aug 12, 2021

What?

  • Added seeds to networks for better reproducibility.
  • Fixed PZ wrapper issue.
  • Some cleanup and doc strings.

Why?

How?

Extra

@KaleabTessera KaleabTessera self-assigned this Aug 12, 2021
@KaleabTessera KaleabTessera added the bug Something isn't working label Aug 12, 2021
@KaleabTessera KaleabTessera changed the title Feature/mava reproducibility and adder fix Feature/mava reproducibility and PZ wrapper fix Aug 12, 2021
Copy link
Contributor

@DriesSmit DriesSmit left a comment

Choose a reason for hiding this comment

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

Thanks, @KaleabTessera 🔥 The changes look great. Just seem my few comments. I really like all the small code cleanups you did 😄

"critics": critic_networks,
"observations": observation_networks,
}
return make_default_networks_maddpg(
Copy link
Contributor

Choose a reason for hiding this comment

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

Did we merge MADDPG and MAD4PG's networks? It does seem like a great idea as much of the code is shared 👍 Thanks @KaleabTessera 😄 It might be worth it to just check if both still work as expected.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will run some benchmarks before merging this in 👍

# The multiplexer concatenates the observations/actions.
networks.CriticMultiplexer(),
networks.LayerNormMLP(
list(critic_networks_layer_sizes[key]) + [1],
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the + [1] be here in the case of MAD4PG? Probably not right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Combining the networks for MADDPG and MAD4PG looks great thanks @KaleabTessera 🙌

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 yes, that is a bug, thanks @DriesSmit !

from acme.tf.networks.continuous import ResidualLayernormWrapper


def get_initialization(seed: Optional[int] = None) -> Any:
Copy link
Contributor

Choose a reason for hiding this comment

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

What makes all these new components different from Acme? Is it to be able to use a seed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep. For most of this it is the seed and the networks are more configurable, i.e. layernorm and activations are configurable.

@DriesSmit DriesSmit self-requested a review August 13, 2021 15:04
Copy link
Collaborator

@arnupretorius arnupretorius left a comment

Choose a reason for hiding this comment

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

Thanks @KaleabTessera! 💪 Looks great!

Happy to merge once we confirm the reproducibility of runs. 😄

def __init__(
self, output_size: int, scale: float = 1e-4, seed: Optional[int] = None
):
"""[summary]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Summary here :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lol, fixed.

Copy link
Collaborator

@arnupretorius arnupretorius 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 the tests and confirmation runs @KaleabTessera 🔥 This is great! 🥳

@arnupretorius arnupretorius merged commit 0a952cc into develop Aug 17, 2021
@arnupretorius arnupretorius deleted the feature/mava-reproducibility-and-adder-fix branch August 17, 2021 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants