Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Feb 18, 2021
1 parent 5947b39 commit a69d3b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pytorch_lightning/trainer/deprecated_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class DeprecatedDistDeviceAttributes:
_running_stage: RunningStage
num_gpus: int
accelerator_connector: AcceleratorConnector
lightning_module = LightningModule

@property
def on_cpu(self) -> bool:
Expand Down Expand Up @@ -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

0 comments on commit a69d3b0

Please sign in to comment.