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/).
110
110
* ([ #10448 ] ( https://github.com/PyTorchLightning/pytorch-lightning/pull/10448 ) )
111
111
112
112
113
+ - Removed deprecated ` utilities.distributed.rank_zero_{warn/deprecation} ` ([ #10451 ] ( https://github.com/PyTorchLightning/pytorch-lightning/pull/10451 ) )
114
+
115
+
113
116
### Fixed
114
117
115
118
- 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 27
27
28
28
import pytorch_lightning as pl
29
29
from 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
32
31
from pytorch_lightning .utilities .exceptions import MisconfigurationException
33
32
34
33
Original file line number Diff line number Diff line change @@ -66,26 +66,6 @@ def _get_rank() -> int:
66
66
rank_zero_only .rank = getattr (rank_zero_only , "rank" , _get_rank ())
67
67
68
68
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
-
89
69
def _info (* args : Any , stacklevel : int = 2 , ** kwargs : Any ) -> None :
90
70
if python_version () >= "3.8.0" :
91
71
kwargs ["stacklevel" ] = stacklevel
Original file line number Diff line number Diff line change 17
17
import pytest
18
18
19
19
from pytorch_lightning import Trainer
20
- from pytorch_lightning .utilities .distributed import rank_zero_deprecation , rank_zero_warn
21
20
from pytorch_lightning .utilities .model_helpers import is_overridden
22
21
from pytorch_lightning .utilities .model_summary import ModelSummary
23
22
from tests .helpers import BoringModel
@@ -78,13 +77,6 @@ def test_v1_6_0_train_loop(tmpdir):
78
77
_ = trainer .train_loop
79
78
80
79
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
-
88
80
def test_v1_6_0_deprecated_model_summary_mode (tmpdir ):
89
81
model = BoringModel ()
90
82
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