Remove DDP import (#89982)

This import is only used for typing, removing it to avoid circular ref
in next diffs

Differential Revision: [D41636897](https://our.internmc.facebook.com/intern/diff/D41636897/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/89982
Approved by: https://github.com/zhaojuanmao
This commit is contained in:
Rohan Varma
2022-11-30 16:17:49 -08:00
committed by PyTorch MergeBot
parent 5a36d99845
commit a5532929da

View File

@ -2,7 +2,6 @@ from enum import Enum
from functools import partial
import torch.distributed as dist
from torch.nn.parallel import DistributedDataParallel
from . import (
debugging_hooks as debugging,
@ -87,7 +86,7 @@ class DDPCommHookType(Enum):
def register_ddp_comm_hook(
comm_hook_type: DDPCommHookType, model: DistributedDataParallel, state=None
comm_hook_type: DDPCommHookType, model, state=None
):
"""
Registers the hooks of ``torch.distributed.algorithms.ddp_comm_hooks``