pytorch_lightning.trainer.states module¶
-
class
pytorch_lightning.trainer.states.
TrainerState
[source]¶ Bases:
enum.Enum
State which is set in the
Trainer
to indicate what is currently or was executed.
-
pytorch_lightning.trainer.states.
trainer_state
(*, entering=None, exiting=None)[source]¶ Decorator for
Trainer
methods which changes state to entering before the function execution and exiting after the function is executed. If None is passed to entering, the state is not changed. If None is passed to exiting, the state is restored to the state before function execution. If INTERRUPTED state is set inside a run function, the state remains INTERRUPTED.- Return type