From 1036248becea3bfd303302b6e934cd4a3ca24dbd Mon Sep 17 00:00:00 2001 From: Aniket Maurya Date: Mon, 4 Apr 2022 01:35:32 +0530 Subject: [PATCH 1/2] remove dep --- pytorch_lightning/core/memory.py | 9 --------- tests/deprecated_api/test_remove_1-7.py | 6 ------ 2 files changed, 15 deletions(-) diff --git a/pytorch_lightning/core/memory.py b/pytorch_lightning/core/memory.py index d61164e6d88cb..4c4ea3a87425e 100644 --- a/pytorch_lightning/core/memory.py +++ b/pytorch_lightning/core/memory.py @@ -21,12 +21,3 @@ # To support backward compatibility as get_memory_profile and get_gpu_memory_map have been moved from pytorch_lightning.utilities.memory import get_gpu_memory_map, get_memory_profile # noqa: E402, F401 # isort: skip - -rank_zero_deprecation( - "`pytorch_lightning.core.memory.LayerSummary` and" - " `pytorch_lightning.core.memory.ModelSummary` have been moved" - " to `pytorch_lightning.utilities.model_summary` since v1.5 and will be removed in v1.7." -) - -# To support backward compatibility as LayerSummary and ModelSummary have been moved -from pytorch_lightning.utilities.model_summary import LayerSummary, ModelSummary # noqa: E402, F401 # isort: skip diff --git a/tests/deprecated_api/test_remove_1-7.py b/tests/deprecated_api/test_remove_1-7.py index ecd890e6b6291..7cbae944c8198 100644 --- a/tests/deprecated_api/test_remove_1-7.py +++ b/tests/deprecated_api/test_remove_1-7.py @@ -51,12 +51,6 @@ def test_v1_7_0_deprecated_lightning_module_summarize(tmpdir): model.summarize(max_depth=1) -def test_v1_7_0_moved_model_summary_and_layer_summary(tmpdir): - _soft_unimport_module("pytorch_lightning.core.memory") - with pytest.deprecated_call(match="to `pytorch_lightning.utilities.model_summary` since v1.5"): - from pytorch_lightning.core.memory import LayerSummary, ModelSummary # noqa: F401 - - def test_v1_7_0_moved_get_memory_profile_and_get_gpu_memory_map(tmpdir): _soft_unimport_module("pytorch_lightning.core.memory") with pytest.deprecated_call(match="to `pytorch_lightning.utilities.memory` since v1.5"): From 9bedb0276d0913307fc1dbb7e17f56866e274e65 Mon Sep 17 00:00:00 2001 From: Aniket Maurya Date: Mon, 4 Apr 2022 01:44:10 +0530 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 400fe58b4eaee..fb15a229bc890 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,6 +60,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). ### Removed +- Removed the deprecated `pytorch_lightning.core.memory.LayerSummary` and `pytorch_lightning.core.memory.ModelSummary` ([#12593](https://github.com/PyTorchLightning/pytorch-lightning/pull/12593)) + + - Removed the deprecated `summarize` method from the `LightningModule` ([#12559](https://github.com/PyTorchLightning/pytorch-lightning/pull/12559))