Skip to content

Commit

Permalink
add return type
Browse files Browse the repository at this point in the history
  • Loading branch information
awaelchli committed Feb 21, 2021
1 parent ce6b96e commit 65b0fe2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pytorch_lightning/core/lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
from pytorch_lightning.core.optimizer import LightningOptimizer
from pytorch_lightning.core.saving import ALLOWED_CONFIG_TYPES, ModelIO, PRIMITIVE_TYPES
from pytorch_lightning.core.step_result import Result
from pytorch_lightning.trainer.states import RunningStage
from pytorch_lightning.utilities import rank_zero_warn
from pytorch_lightning.utilities.apply_func import apply_to_collection, convert_to_tensors
from pytorch_lightning.utilities.device_dtype_mixin import DeviceDtypeModuleMixin
Expand Down Expand Up @@ -169,7 +170,7 @@ def automatic_optimization(self) -> bool:
return self._automatic_optimization

@property
def running_stage(self):
def running_stage(self) -> Optional[RunningStage]:
return self.trainer._running_stage if self.trainer else None

@automatic_optimization.setter
Expand Down

0 comments on commit 65b0fe2

Please sign in to comment.