-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[typing] Add typehint for broadcast in training type plugin #6777
Conversation
pytorch_lightning/plugins/training_type/training_type_plugin.py
Outdated
Show resolved
Hide resolved
@@ -480,7 +480,7 @@ def connect_precision_plugin(self, plugin: PrecisionPlugin) -> None: | |||
) | |||
self.setup_precision_plugin(plugin) | |||
|
|||
def save_checkpoint(self, checkpoint: Dict[str, Any], filepath) -> None: | |||
def save_checkpoint(self, checkpoint: Dict[str, Any], filepath: str) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Could it be Path as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kaushikb11 Path isn't part of the typehint here: https://github.com/PyTorchLightning/pytorch-lightning/blob/1bd5f36a5bf02ba853c04de77647456c64784399/pytorch_lightning/plugins/training_type/training_type_plugin.py#L240
which is why I didn't include it here
Co-authored-by: Akihiro Nitta <nitta@akihironitta.com>
Codecov Report
@@ Coverage Diff @@
## master #6777 +/- ##
=======================================
- Coverage 87% 87% -0%
=======================================
Files 192 192
Lines 12183 12349 +166
=======================================
+ Hits 10599 10685 +86
- Misses 1584 1664 +80 |
What does this PR do?
Fixes #6731
Before submitting
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:
Did you have fun?
Make sure you had fun coding 🙃