Skip to content

Commit 3684282

Browse files
aniketmauryaakihironittaawaelchli
authored
Remove deprecated LayerSummary and ModelSummary (#12593)
Co-authored-by: Akihiro Nitta <[email protected]> Co-authored-by: Adrian Wälchli <[email protected]>
1 parent 568710f commit 3684282

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
6666

6767
### Removed
6868

69+
- Removed the deprecated `pytorch_lightning.core.memory.LayerSummary` and `pytorch_lightning.core.memory.ModelSummary` ([#12593](https://github.com/PyTorchLightning/pytorch-lightning/pull/12593))
70+
71+
6972
- Removed the deprecated `summarize` method from the `LightningModule` ([#12559](https://github.com/PyTorchLightning/pytorch-lightning/pull/12559))
7073

7174

pytorch_lightning/core/memory.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,3 @@
2121

2222
# To support backward compatibility as get_memory_profile and get_gpu_memory_map have been moved
2323
from pytorch_lightning.utilities.memory import get_gpu_memory_map, get_memory_profile # noqa: E402, F401 # isort: skip
24-
25-
rank_zero_deprecation(
26-
"`pytorch_lightning.core.memory.LayerSummary` and"
27-
" `pytorch_lightning.core.memory.ModelSummary` have been moved"
28-
" to `pytorch_lightning.utilities.model_summary` since v1.5 and will be removed in v1.7."
29-
)
30-
31-
# To support backward compatibility as LayerSummary and ModelSummary have been moved
32-
from pytorch_lightning.utilities.model_summary import LayerSummary, ModelSummary # noqa: E402, F401 # isort: skip

tests/deprecated_api/test_remove_1-7.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,6 @@
4545
from tests.plugins.environments.test_lsf_environment import _make_rankfile
4646

4747

48-
def test_v1_7_0_moved_model_summary_and_layer_summary(tmpdir):
49-
_soft_unimport_module("pytorch_lightning.core.memory")
50-
with pytest.deprecated_call(match="to `pytorch_lightning.utilities.model_summary` since v1.5"):
51-
from pytorch_lightning.core.memory import LayerSummary, ModelSummary # noqa: F401
52-
53-
5448
def test_v1_7_0_moved_get_memory_profile_and_get_gpu_memory_map(tmpdir):
5549
_soft_unimport_module("pytorch_lightning.core.memory")
5650
with pytest.deprecated_call(match="to `pytorch_lightning.utilities.memory` since v1.5"):

0 commit comments

Comments
 (0)