Skip to content

Prevent init normalize on --resume #4463

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
Sep 9, 2020
Merged

Prevent init normalize on --resume #4463

merged 3 commits into from
Sep 9, 2020

Conversation

andrewcoh
Copy link
Contributor

Proposed change(s)

Addresses the bug raised in MLA-1349
.

The issue was introduced in #4299. The problem was that on resume, the initialization op of the normalizer was being executed but it should not. This may not be an issue in envs with significant diversity in observations.

Useful links (Github issues, JIRA tickets, ML-Agents forum threads etc.)

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

@@ -99,6 +99,7 @@ def initialize_or_load(self, policy: Optional[TFPolicy] = None) -> None:
def _load_graph(
self, policy: TFPolicy, model_path: str, reset_global_steps: bool = False
) -> None:
policy.first_normalization_update = False
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the fix.

Co-authored-by: Ervin T. <[email protected]>
@andrewcoh andrewcoh merged commit 5655aa9 into master Sep 9, 2020
@delete-merged-branch delete-merged-branch bot deleted the fix-resume-bug branch September 9, 2020 00:40
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 9, 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.

3 participants