OnExceptionCheckpoint
- class lightning.pytorch.callbacks.OnExceptionCheckpoint(dirpath, filename='on_exception')
Bases:
CheckpointUsed to save a checkpoint on exception.
- Parameters:
- Raises:
ValueError – If
filenameis empty.
Example
>>> from lightning.pytorch import Trainer >>> from lightning.pytorch.callbacks import OnExceptionCheckpoint >>> trainer = Trainer(callbacks=[OnExceptionCheckpoint(".")])- on_exception(trainer, *_, **__)
Called when any trainer execution is interrupted by an exception.
- Return type:
- teardown(trainer, *_, **__)
Called when fit, validate, test, predict, or tune ends.
- Return type:
Was this page helpful?
Thanks for the feedback.