pytorch-lightning icon indicating copy to clipboard operation
pytorch-lightning copied to clipboard

Avoid entry_points deprecation warning

Open carmocca opened this issue 3 years ago • 4 comments

What does this PR do?

Fixes https://github.com/Lightning-AI/lightning/issues/13989

Does your PR introduce any breaking changes? If yes, please list them.

None

Before submitting

  • [x] Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • [x] Did you read the contributor guideline, Pull Request section?
  • [x] Did you make sure your PR does only one thing, instead of bundling different changes together?
  • [n/a] Did you make sure to update the documentation with your changes? (if necessary)
  • [n/a] Did you write any new necessary tests? (not for typos and docs)
  • [ ] Did you verify new and existing tests pass locally with your changes?
  • [x] Did you list all the breaking changes introduced by this pull request?
  • [x] Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review

  • [x] Is this pull request ready for review? (if not, please submit in draft mode)
  • [x] Check that all items from Before submitting are resolved
  • [x] Make sure the title is self-explanatory and the description concisely explains the PR
  • [x] Add labels and milestones (and optionally projects) to the PR so it can be classified

cc @borda @justusschock @kaushikb11 @awaelchli @ninginthecloud @akihironitta

carmocca avatar Aug 05 '22 17:08 carmocca

Codecov Report

Merging #14052 (51945db) into master (d29a552) will increase coverage by 15%. The diff coverage is 100%.

:exclamation: Current head 51945db differs from pull request most recent head c86b87e. Consider uploading reports for the commit c86b87e to get more accurate results

@@            Coverage Diff            @@
##           master   #14052     +/-   ##
=========================================
+ Coverage      61%      76%    +15%     
=========================================
  Files         324      323      -1     
  Lines       26369    26358     -11     
=========================================
+ Hits        16138    20119   +3981     
+ Misses      10231     6239   -3992     

codecov[bot] avatar Aug 05 '22 18:08 codecov[bot]

I can confirm that this fixes #13989 for me!

adamjstewart avatar Aug 06 '22 21:08 adamjstewart

Do you think we should let pytest treat DeprecationWarning as errors just like FutureWarning?

I tried it in the past and there's a TON of overrides we would need to add, because we also would fail from warnings triggered inside our dependencies. Unless there's an easy way to filter those triggered in our codebase.

carmocca avatar Aug 09 '22 12:08 carmocca

Do you think we should let pytest treat DeprecationWarning as errors just like FutureWarning?

We do this in TorchGeo, including some specific to lightning.

there's a TON of overrides we would need to add, because we also would fail from warnings triggered inside our dependencies. Unless there's an easy way to filter those triggered in our codebase.

This is unfortunately true in my experience, although you probably wouldn't need more than 5–10. I'm unaware of any way to handle deprecation warnings differently depending on whether your code or a dependency is using a deprecated feature.

adamjstewart avatar Aug 09 '22 17:08 adamjstewart