diff --git a/CHANGELOG.md b/CHANGELOG.md index 2287e97f7751e..2596afd672600 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -85,6 +85,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Removed the deprecated `prepare_data_per_node` argument from the `Trainer` constructor ([#12536](https://github.com/PyTorchLightning/pytorch-lightning/pull/12536)) +- Removed the deprecated `pytorch_lightning.core.memory.{get_gpu_memory_map,get_memory_profile}` ([#12659](https://github.com/PyTorchLightning/pytorch-lightning/pull/12659)) + + - Removed the deprecated `terminate_on_nan` argument from the `Trainer` constructor ([#12553](https://github.com/PyTorchLightning/pytorch-lightning/pull/12553)) diff --git a/pytorch_lightning/core/memory.py b/pytorch_lightning/core/memory.py deleted file mode 100644 index 454402e615d46..0000000000000 --- a/pytorch_lightning/core/memory.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright The PyTorch Lightning team. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -from pytorch_lightning.utilities import rank_zero_deprecation - -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/setup.cfg b/setup.cfg index 9f908742c0110..95612febfae77 100644 --- a/setup.cfg +++ b/setup.cfg @@ -31,7 +31,6 @@ filterwarnings = # warnings from deprecated modules on import # TODO: remove in 1.7 ignore::pytorch_lightning.utilities.rank_zero.LightningDeprecationWarning:pytorch_lightning.core.decorators - ignore::pytorch_lightning.utilities.rank_zero.LightningDeprecationWarning:pytorch_lightning.core.memory xfail_strict = true junit_duration_report = call diff --git a/tests/deprecated_api/test_remove_1-7.py b/tests/deprecated_api/test_remove_1-7.py index 466a4a5561664..1c0fe166e29ac 100644 --- a/tests/deprecated_api/test_remove_1-7.py +++ b/tests/deprecated_api/test_remove_1-7.py @@ -42,12 +42,6 @@ from tests.plugins.environments.test_lsf_environment import _make_rankfile -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_datamodule_transform_properties(tmpdir): dm = MNISTDataModule() with pytest.deprecated_call(match=r"DataModule property `val_transforms` was deprecated in v1.5"):