Skip to content

[bug-fix] Don't load non-wrapped policy #4593

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 6 commits into from
Oct 23, 2020
Merged

Conversation

ervteng
Copy link
Contributor

@ervteng ervteng commented Oct 21, 2020

Proposed change(s)

The ghost trainer creates an unwrapped policy for ghosting (that doesn't belong to any trainer), and initializes/loads it. This causes an issue on load for TensorFlow, since the saving ops are not added to the policy (normally they are added when the policy is added to a trainer). However, the checkpoint does contain these ops, so when we attempt to load it, TF throws an error.

This change makes sure the unwrapped policy is never loaded. This policy will then receive the weights of the wrapped policy, so it's not an issue.

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 changed the title [bug-fix] Always initialize non-wrapped policy [bug-fix] Don't load non-wrapped policy Oct 21, 2020
@ervteng ervteng merged commit b0a8c88 into master Oct 23, 2020
@delete-merged-branch delete-merged-branch bot deleted the develop-fixghostresume branch October 23, 2020 00:54
dongruoping pushed a commit that referenced this pull request Oct 30, 2020
* Always initialize non-wrapped policy

* Load ghosted policy

* Update changelog

* Resume test

* Add test

* Add torch test and fix torch.
dongruoping pushed a commit that referenced this pull request Oct 31, 2020
* Always initialize non-wrapped policy

* Load ghosted policy

* Update changelog

* Resume test

* Add test

* Add torch test and fix torch.
dongruoping pushed a commit that referenced this pull request Nov 2, 2020
* [bug-fix] Don't load non-wrapped policy (#4593)

* pin cattrs version

* cap PyTorch version

* use v2 action and pin python version (#4568)

Co-authored-by: Ervin T <[email protected]>
Co-authored-by: Chris Elion <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 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