Skip to content

Conversation

@donlapark
Copy link
Contributor

@donlapark donlapark commented Jul 26, 2022

What does this PR do?

Fixes mypy errors in pytorch_lightning/strategies/ddp_spawn.py as mentioned in #13445.

There is one issue: somehow mypy sees self.model._get_ddp_logging_data as a Tensor and throws "Tensor" not callableerror when calling self.model._get_ddp_logging_data().

Edit: I just saw the reported issue on pytorch/pytorch#81462 so I am going to add # type: ignore[operator] for now.

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

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 list all the breaking changes introduced by this pull request?
  • 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:

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

@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Jul 26, 2022
@donlapark donlapark changed the title Fix mypy ddp spawn Fix mypy errors in strategies/ddp_spawn.py Jul 26, 2022
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.

Nice work. Looks pretty good already :)

@mergify mergify bot removed the has conflicts label Jul 27, 2022
@codecov
Copy link

codecov bot commented Jul 27, 2022

Codecov Report

Merging #13865 (133a25e) into master (511875e) will decrease coverage by 10%.
The diff coverage is 58%.

@@            Coverage Diff            @@
##           master   #13865     +/-   ##
=========================================
- Coverage      86%      76%    -10%     
=========================================
  Files         332      332             
  Lines       26123    26145     +22     
=========================================
- Hits        22478    19965   -2513     
- Misses       3645     6180   +2535     

@awaelchli awaelchli added code quality community This PR is from the community labels Jul 27, 2022
@awaelchli awaelchli added this to the pl:1.6.x milestone Jul 27, 2022
@carmocca carmocca modified the milestones: pl:1.6.x, pl:1.8 Jul 28, 2022
@mergify mergify bot added the ready PRs ready to be merged label Jul 28, 2022
@rohitgr7 rohitgr7 enabled auto-merge (squash) July 28, 2022 18:29
@rohitgr7 rohitgr7 merged commit 233b36b into Lightning-AI:master Jul 28, 2022
@carmocca carmocca modified the milestones: pl:1.8, pl:1.7 Jul 28, 2022
@donlapark donlapark mentioned this pull request Aug 2, 2022
52 tasks
@donlapark donlapark deleted the fix_mypy_ddp_spawn branch September 7, 2022 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code quality community This PR is from the community pl Generic label for PyTorch Lightning package ready PRs ready to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants