Skip to content

Conversation

@CyprienRicque
Copy link
Contributor

@CyprienRicque CyprienRicque commented Jul 6, 2022

What does this PR do?

Fixes mypy typing errors in pytorch_lightning/strategies/parallel.py in #13445.

  • Adding a new protocol DistributedDataParallel to inform mypy of the existence of the function no_sync in torch.nn.parallel.DistributedDataParallel
  • Usage of ``assert``` to check non-null and types.

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

None

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 🙃

@CyprienRicque CyprienRicque mentioned this pull request Jul 6, 2022
52 tasks
@mergify mergify bot added the ready PRs ready to be merged label Jul 7, 2022
@akihironitta akihironitta added this to the pl:1.7 milestone Jul 8, 2022
@otaj otaj enabled auto-merge (squash) July 8, 2022 14:55
@otaj otaj merged commit 3584161 into Lightning-AI:master Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code quality ready PRs ready to be merged strategy

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants