mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
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:
committed by
PyTorch MergeBot
parent
5a36d99845
commit
a5532929da
@ -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``
|
||||
|
Reference in New Issue
Block a user