diff --git a/pytorch_lightning/core/lightning.py b/pytorch_lightning/core/lightning.py index 71d3ec186b7c0..c6bd26cce869a 100644 --- a/pytorch_lightning/core/lightning.py +++ b/pytorch_lightning/core/lightning.py @@ -1961,7 +1961,7 @@ def model_size(self) -> float: """ rank_zero_deprecation( "The `LightningModule.model_size` property was deprecated in v1.5 and will be removed in v1.7. Please " - "use the get_model_size_mb method under utilities/memory.py" + "use the `utilities.memory.get_model_size_mb` method under utilities/memory.py" ) tmp_name = f"{uuid.uuid4().hex}.pt" diff --git a/tests/deprecated_api/test_remove_1-7.py b/tests/deprecated_api/test_remove_1-7.py index a789493e7113b..f2ed31114f5f2 100644 --- a/tests/deprecated_api/test_remove_1-7.py +++ b/tests/deprecated_api/test_remove_1-7.py @@ -21,6 +21,6 @@ def test_v1_7_0_deprecated_model_size(): model = BoringModel() with pytest.deprecated_call( match="The `LightningModule.model_size` property was deprecated in v1.5 and will be removed in v1.7. " - "Please use the get_model_size_mb method under utilities/memory.py" + "Please use the `utilities.memory.get_model_size_mb` method under utilities/memory.py" ): _ = model.model_size