Skip to content

Commit d9a4214

Browse files
committed
Fix and move import statement to the top
1 parent 8f9996a commit d9a4214

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pytorch_lightning/utilities/distributed.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from pytorch_lightning.utilities.rank_zero import rank_zero_only # noqa: F401
2626
from pytorch_lightning.utilities.rank_zero import rank_zero_deprecation
2727
from pytorch_lightning.utilities.rank_zero import rank_zero_info as new_rank_zero_info
28+
from pytorch_lightning.utilities.rank_zero import rank_zero_warn as new_rank_zero_warn
2829

2930
if _TPU_AVAILABLE:
3031
import torch_xla.core.xla_model as xm
@@ -281,8 +282,6 @@ def register_ddp_comm_hook(
281282
... ddp_comm_wrapper=default.fp16_compress_wrapper,
282283
... )
283284
"""
284-
from pytorch_lightning.utilities import rank_zero_warn
285-
286285
if ddp_comm_hook is None:
287286
return
288287
# inform mypy that ddp_comm_hook is callable

0 commit comments

Comments
 (0)