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

[bugfix] Metric not logged properly in manual optimization #7228

Merged
merged 5 commits into from
Apr 27, 2021

Conversation

tchaton
Copy link
Contributor

@tchaton tchaton commented Apr 27, 2021

What does this PR do?

Fixes #7206 #6833

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • 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?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

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

Did you have fun?

Make sure you had fun coding 🙃

@tchaton tchaton added this to the v1.3 milestone Apr 27, 2021
@tchaton tchaton requested a review from awaelchli as a code owner April 27, 2021 08:24
@tchaton tchaton self-assigned this Apr 27, 2021
@pep8speaks
Copy link

pep8speaks commented Apr 27, 2021

Hello @tchaton! Thanks for updating this PR.

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2021-04-27 13:14:16 UTC

@tchaton tchaton added the bug Something isn't working label Apr 27, 2021
Copy link
Contributor

@kaushikb11 kaushikb11 left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -1379,9 +1379,6 @@ def optimizer_step(self, epoch, batch_idx, optimizer, optimizer_idx,
optimizer.step(closure=optimizer_closure)

"""
if not isinstance(optimizer, LightningOptimizer):
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 legacy and should have been removed some time ago.

@codecov
Copy link

codecov bot commented Apr 27, 2021

Codecov Report

Merging #7228 (f079cb8) into master (52a5cee) will decrease coverage by 2%.
The diff coverage is 100%.

❗ Current head f079cb8 differs from pull request most recent head 8ee8a55. Consider uploading reports for the commit 8ee8a55 to get more accurate results

@@           Coverage Diff           @@
##           master   #7228    +/-   ##
=======================================
- Coverage      91%     90%    -2%     
=======================================
  Files         198     198            
  Lines       12647   13002   +355     
=======================================
+ Hits        11531   11652   +121     
- Misses       1116    1350   +234     

@SeanNaren SeanNaren enabled auto-merge (squash) April 27, 2021 09:57
@SeanNaren SeanNaren added the ready PRs ready to be merged label Apr 27, 2021
@tchaton tchaton added the _Will label Apr 27, 2021
Copy link
Member

@ethanwharris ethanwharris left a comment

Choose a reason for hiding this comment

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

LGTM 😃

@carmocca carmocca added admin Requires admin privileges to merge and removed _Will labels Apr 27, 2021
Copy link
Contributor

@awaelchli awaelchli left a comment

Choose a reason for hiding this comment

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

LGTM, test fails on master (for 16 bit)

tests/trainer/optimization/test_manual_optimization.py Outdated Show resolved Hide resolved
@lexierule lexierule disabled auto-merge April 27, 2021 12:46
@lexierule lexierule merged commit f920ba2 into master Apr 27, 2021
@lexierule lexierule deleted the metric_manual_optimization branch April 27, 2021 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin Requires admin privileges to merge bug Something isn't working ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Metric are not logged for Manual Optimization
9 participants