From 8d23f6287adf1e1040948802e6649c4ae2b3eda1 Mon Sep 17 00:00:00 2001 From: ananthsub Date: Wed, 9 Feb 2022 19:29:32 -0800 Subject: [PATCH] Update module path for `LightningDeprecationWarning` in setup.cfg (#11793) --- pytorch_lightning/utilities/distributed.py | 4 ++-- setup.cfg | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pytorch_lightning/utilities/distributed.py b/pytorch_lightning/utilities/distributed.py index 7c8b1162e3..ca16b0e242 100644 --- a/pytorch_lightning/utilities/distributed.py +++ b/pytorch_lightning/utilities/distributed.py @@ -289,7 +289,7 @@ def register_ddp_comm_hook( if not _TORCH_GREATER_EQUAL_1_9: rank_zero_warn("Not applying DDP comm wrapper. To use communication wrapper, please use pytorch>=1.9.0.") else: - rank_zero_info( + new_rank_zero_info( f"DDP comm wrapper is provided, apply {ddp_comm_wrapper.__qualname__}({ddp_comm_hook.__qualname__})." ) ddp_comm_hook = ddp_comm_wrapper(ddp_comm_hook) @@ -336,7 +336,7 @@ def init_dist_connection( torch.distributed.init_process_group(torch_distributed_backend, rank=global_rank, world_size=world_size, **kwargs) # on rank=0 let everyone know training is starting - rank_zero_info( + new_rank_zero_info( f"{'-' * 100}\n" f"distributed_backend={torch_distributed_backend}\n" f"All distributed processes registered. Starting with {world_size} processes\n" diff --git a/setup.cfg b/setup.cfg index 9f3f581150..79ab35616e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -26,12 +26,12 @@ addopts = --disable-pytest-warnings filterwarnings = # error out on our deprecation warnings - ensures the code and tests are kept up-to-date - error::pytorch_lightning.utilities.warnings.LightningDeprecationWarning + error::pytorch_lightning.utilities.rank_zero.LightningDeprecationWarning error::FutureWarning # warnings from deprecated modules on import # TODO: remove in 1.7 - ignore::pytorch_lightning.utilities.warnings.LightningDeprecationWarning:pytorch_lightning.core.decorators - ignore::pytorch_lightning.utilities.warnings.LightningDeprecationWarning:pytorch_lightning.core.memory + ignore::pytorch_lightning.utilities.rank_zero.LightningDeprecationWarning:pytorch_lightning.core.decorators + ignore::pytorch_lightning.utilities.rank_zero.LightningDeprecationWarning:pytorch_lightning.core.memory junit_duration_report = call