File tree Expand file tree Collapse file tree 4 files changed +4
-30
lines changed Expand file tree Collapse file tree 4 files changed +4
-30
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
110110 * ([ #10448 ] ( https://github.com/PyTorchLightning/pytorch-lightning/pull/10448 ) )
111111
112112
113+ - Removed deprecated ` utilities.distributed.rank_zero_{warn/deprecation} ` ([ #10451 ] ( https://github.com/PyTorchLightning/pytorch-lightning/pull/10451 ) )
114+
115+
113116### Fixed
114117
115118- Fixed an issue where class or init-only variables of dataclasses were passed to the dataclass constructor in ` utilities.apply_to_collection ` ([ #9702 ] ( https://github.com/PyTorchLightning/pytorch-lightning/issues/9702 ) )
Original file line number Diff line number Diff line change 2727
2828import pytorch_lightning as pl
2929from pytorch_lightning .callbacks .base import Callback
30- from pytorch_lightning .utilities import rank_zero_warn
31- from pytorch_lightning .utilities .distributed import rank_zero_deprecation
30+ from pytorch_lightning .utilities import rank_zero_deprecation , rank_zero_warn
3231from pytorch_lightning .utilities .exceptions import MisconfigurationException
3332
3433
Original file line number Diff line number Diff line change @@ -66,26 +66,6 @@ def _get_rank() -> int:
6666rank_zero_only .rank = getattr (rank_zero_only , "rank" , _get_rank ())
6767
6868
69- def rank_zero_warn (* args : Any , stacklevel : int = 5 , ** kwargs : Any ) -> None :
70- from pytorch_lightning .utilities .warnings import rank_zero_deprecation , rank_zero_warn
71-
72- rank_zero_deprecation (
73- "`pytorch_lightning.utilities.distributed.rank_zero_warn` has been moved to"
74- " `pytorch_lightning.utilities.rank_zero_warn` in v1.3.7 and will be removed in v1.6"
75- )
76- return rank_zero_warn (* args , stacklevel = stacklevel , ** kwargs )
77-
78-
79- def rank_zero_deprecation (* args : Any , stacklevel : int = 5 , ** kwargs : Any ) -> None :
80- from pytorch_lightning .utilities .warnings import rank_zero_deprecation
81-
82- rank_zero_deprecation (
83- "`pytorch_lightning.utilities.distributed.rank_zero_deprecation` has been moved to"
84- " `pytorch_lightning.utilities.rank_zero_deprecation` in v1.3.7 and will be removed in v1.6"
85- )
86- return rank_zero_deprecation (* args , stacklevel = stacklevel , ** kwargs )
87-
88-
8969def _info (* args : Any , stacklevel : int = 2 , ** kwargs : Any ) -> None :
9070 if python_version () >= "3.8.0" :
9171 kwargs ["stacklevel" ] = stacklevel
Original file line number Diff line number Diff line change 1717import pytest
1818
1919from pytorch_lightning import Trainer
20- from pytorch_lightning .utilities .distributed import rank_zero_deprecation , rank_zero_warn
2120from pytorch_lightning .utilities .model_helpers import is_overridden
2221from pytorch_lightning .utilities .model_summary import ModelSummary
2322from tests .helpers import BoringModel
@@ -78,13 +77,6 @@ def test_v1_6_0_train_loop(tmpdir):
7877 _ = trainer .train_loop
7978
8079
81- def test_v1_6_0_rank_zero_warnings_moved ():
82- with pytest .deprecated_call (match = "in v1.3.7 and will be removed in v1.6" ):
83- rank_zero_warn ("test" )
84- with pytest .deprecated_call (match = "in v1.3.7 and will be removed in v1.6" ):
85- rank_zero_deprecation ("test" )
86-
87-
8880def test_v1_6_0_deprecated_model_summary_mode (tmpdir ):
8981 model = BoringModel ()
9082 with pytest .deprecated_call (match = "Argument `mode` in `ModelSummary` is deprecated in v1.4" ):
You can’t perform that action at this time.
0 commit comments