Skip to content

[refactor] Remove references to brain_name in policy #4134

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

Merged
merged 3 commits into from
Jun 18, 2020

Conversation

ervteng
Copy link
Contributor

@ervteng ervteng commented Jun 18, 2020

Proposed change(s)

Removes all references to BrainParameters.brain_name in policy. brain_name is the only thing that's added to BehaviorSpec when making a BrainParameters, so this sets the stage for removal of BrainParameters in Python.

We also do some cleanup to move the validation of memory_size to the attrs class in settings.py and correct incorrect documentation that says memory_size must be divisible by 4.

Types of change(s)

  • Bug fix
  • New feature
  • Code refactor
  • Breaking change
  • Documentation update
  • Other (please describe)

Checklist

  • Added tests that prove my fix is effective or that my feature works
  • Updated the changelog (if applicable)
  • Updated the documentation (if applicable)
  • Updated the migration guide (if applicable)

Other comments

@ervteng ervteng requested a review from andrewcoh June 18, 2020 01:54
@@ -121,7 +121,7 @@ def export_model(self, name_behavior_id: str) -> None:
Exports the model
"""
policy = self.get_policy(name_behavior_id)
settings = SerializationSettings(policy.model_path, policy.brain.brain_name)
Copy link
Contributor

Choose a reason for hiding this comment

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

gross

Copy link
Contributor Author

Choose a reason for hiding this comment

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

With PSankalp's change this stuff should go live in the policy anyways.

Copy link
Contributor

@andrewcoh andrewcoh left a comment

Choose a reason for hiding this comment

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

:shipit:

@ervteng ervteng merged commit 94a00f7 into master Jun 18, 2020
@delete-merged-branch delete-merged-branch bot deleted the develop-removebrainnamepolicy branch June 18, 2020 22:56
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants