Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated LayerSummary and ModelSummary #12593

Merged
merged 5 commits into from
Apr 10, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))


Expand Down
9 changes: 0 additions & 9 deletions pytorch_lightning/core/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 0 additions & 6 deletions tests/deprecated_api/test_remove_1-7.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,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_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"):
Expand Down