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

Disable pl optimizer temporarily to fix AMP issues #5163

Merged
merged 7 commits into from
Dec 17, 2020
Merged

Conversation

SeanNaren
Copy link
Contributor

@SeanNaren SeanNaren commented Dec 16, 2020

What does this PR do?

Temporary hotfix to address issues of #5159.

It seems in this part of the code:

https://github.com/PyTorchLightning/pytorch-lightning/blob/master/pytorch_lightning/plugins/native_amp.py#L54-L55

PL lightning optimizer results in different outputs. Not entirely sure yet but need to debug and track in the associated issue.

Fixes # (issue)

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together? Otherwise, we ask you to create a separate PR for every change.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified; Bugfixes should be including in bug-fix release milestones (m.f.X) and features should be included in (m.X.b) releases.

Did you have fun?

Make sure you had fun coding 🙃

@SeanNaren SeanNaren added bug Something isn't working priority: 0 High priority task labels Dec 16, 2020
@SeanNaren SeanNaren added this to the 1.1.x milestone Dec 16, 2020
@Borda
Copy link
Member

Borda commented Dec 16, 2020

btw, there are quite many failing tests...

@SeanNaren
Copy link
Contributor Author

I've added a todo and a fix (hopefully it builds fine now), seems like there is an underlying internal issue. We wrap the model in the lightning optimizer internally and never unwrap it. If a user specifies that they'd not like to wrap their model in the pl optimizer, not sure why we never unwrap cc @tchaton

@codecov
Copy link

codecov bot commented Dec 16, 2020

Codecov Report

Merging #5163 (e0c9019) into master (81fd33b) will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master   #5163   +/-   ##
======================================
  Coverage      93%     93%           
======================================
  Files         134     134           
  Lines        9928    9928           
======================================
  Hits         9242    9242           
  Misses        686     686           

@SeanNaren SeanNaren merged commit 3910b28 into master Dec 17, 2020
@SeanNaren SeanNaren deleted the bug/amp_hotfix branch December 17, 2020 01:08
awaelchli pushed a commit that referenced this pull request Dec 18, 2020
* Disable pl optimizer temporarily to fix AMP issues

* Add todo and enable pl optimizer in the test
Borda pushed a commit that referenced this pull request Dec 23, 2020
* Disable pl optimizer temporarily to fix AMP issues

* Add todo and enable pl optimizer in the test
Borda pushed a commit that referenced this pull request Dec 29, 2020
* Disable pl optimizer temporarily to fix AMP issues

* Add todo and enable pl optimizer in the test
Borda pushed a commit that referenced this pull request Jan 4, 2021
* Disable pl optimizer temporarily to fix AMP issues

* Add todo and enable pl optimizer in the test
Borda pushed a commit that referenced this pull request Jan 4, 2021
* Disable pl optimizer temporarily to fix AMP issues

* Add todo and enable pl optimizer in the test
Borda pushed a commit that referenced this pull request Jan 5, 2021
* Disable pl optimizer temporarily to fix AMP issues

* Add todo and enable pl optimizer in the test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: 0 High priority task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants