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

Fix mypy typing errors in pytorch_lightning/trainer/trainer.py

Open Jungwon-Lee opened this issue 2 years ago • 4 comments

What does this PR do?

Part of https://github.com/Lightning-AI/lightning/issues/13445.

Fix typing errors in pytorch_lightning/trainer/trainer.py

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

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?
  • [x] Did you make sure to update the documentation with your changes? (if necessary)
  • [x] Did you write any new necessary tests? (not for typos and docs)
  • [x] 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

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

  • [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

Did you have fun?

Make sure you had fun coding 🙃

Jungwon-Lee avatar Aug 15 '22 10:08 Jungwon-Lee

@BongYang, great work; mind checking the collisions? :rabbit:

Borda avatar Sep 12 '22 19:09 Borda

@BongYang, great work; mind checking the collisions? 🐰

@Borda Done

but there is import error for get_len how can I solve this?

Jungwon-Lee avatar Sep 13 '22 04:09 Jungwon-Lee

Hi @BongYang, the issue was with circular imports. I took the liberty to resolve the import errors for you :zap:

otaj avatar Sep 13 '22 15:09 otaj

Codecov Report

Merging #14204 (e187be6) into master (021c2f1) will increase coverage by 1%. The diff coverage is 98%.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #14204     +/-   ##
=========================================
+ Coverage      83%      84%     +1%     
=========================================
  Files         395      276    -119     
  Lines       28814    21108   -7706     
=========================================
- Hits        23884    17757   -6127     
+ Misses       4930     3351   -1579     

codecov[bot] avatar Sep 15 '22 09:09 codecov[bot]