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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[metrics] change default behaviour of state dict #4685

Merged
merged 5 commits into from
Nov 16, 2020

Conversation

SkafteNicki
Copy link
Member

What does this PR do?

Fixes
#4361
#4645
#4666

As default metrics add their internal state to the models state_dict. However, it seems counter intuitive to users (already 3 issues on this specific topic), and even though we since v1.0.6 provides a .persistent(mode) to change this behavior, the feedback indicates that it is probably better as default to not add the metric state to state_dict (and then the method can be used to switch it on).

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 in short, see 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 馃檭

@SkafteNicki SkafteNicki added bug Something isn't working Metrics labels Nov 15, 2020
@SkafteNicki SkafteNicki added this to in Progress in Metrics package via automation Nov 15, 2020
@SkafteNicki SkafteNicki added this to the 1.0.x milestone Nov 15, 2020
@codecov
Copy link

codecov bot commented Nov 15, 2020

Codecov Report

Merging #4685 (7b60f4b) into master (be60efb) will decrease coverage by 0%.
The diff coverage is 100%.

@@          Coverage Diff           @@
##           master   #4685   +/-   ##
======================================
- Coverage      93%     93%   -0%     
======================================
  Files         117     117           
  Lines        8932    8932           
======================================
- Hits         8299    8298    -1     
- Misses        633     634    +1     

@SkafteNicki SkafteNicki linked an issue Nov 15, 2020 that may be closed by this pull request
Copy link
Contributor

@teddykoker teddykoker left a comment

Choose a reason for hiding this comment

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

Makes sense to me, I think I overlooked this when we first implemented them

Copy link
Contributor

@rohitgr7 rohitgr7 left a comment

Choose a reason for hiding this comment

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

LGTM. Just one comment.

docs/source/metrics.rst Outdated Show resolved Hide resolved
Metrics package automation moved this from in Progress to in Review Nov 16, 2020
Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

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

LGTM !

@tchaton tchaton merged commit 5109766 into Lightning-AI:master Nov 16, 2020
Metrics package automation moved this from in Review to Done Nov 16, 2020
tchaton added a commit that referenced this pull request Nov 17, 2020
* fix state dict

* Update docs/source/metrics.rst

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>

* changelog

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>
rohitgr7 added a commit that referenced this pull request Nov 21, 2020
* fix state dict

* Update docs/source/metrics.rst

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>

* changelog

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>
@SkafteNicki SkafteNicki deleted the metrics/state_dict branch November 23, 2020 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
4 participants