From a69d3b04a81c6c4bb2db164f183282b2a5ade025 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Thu, 18 Feb 2021 14:54:59 +0100 Subject: [PATCH] ... --- pytorch_lightning/trainer/deprecated_api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pytorch_lightning/trainer/deprecated_api.py b/pytorch_lightning/trainer/deprecated_api.py index ddd54961c558c..e1eecf26ed70e 100644 --- a/pytorch_lightning/trainer/deprecated_api.py +++ b/pytorch_lightning/trainer/deprecated_api.py @@ -24,7 +24,6 @@ class DeprecatedDistDeviceAttributes: _running_stage: RunningStage num_gpus: int accelerator_connector: AcceleratorConnector - lightning_module = LightningModule @property def on_cpu(self) -> bool: @@ -136,10 +135,11 @@ def use_single_gpu(self, val: bool) -> None: class DeprecatedModelAttributes: + lightning_module = LightningModule + def get_model(self) -> LightningModule: rank_zero_warn( "The use of `Trainer.get_model()` is deprecated in favor of `Trainer.lightning_module`" - " and will be removed in v1.4.", - DeprecationWarning, + " and will be removed in v1.4.", DeprecationWarning ) return self.lightning_module