OnExceptionCheckpoint¶
- class lightning.pytorch.callbacks.OnExceptionCheckpoint(dirpath, filename='on_exception')[소스]¶
기반 클래스:
lightning.pytorch.callbacks.checkpoint.Checkpoint
Used to save a checkpoint on exception.
- 매개변수
- 예외 발생
ValueError – If
filename
is empty.
예제
>>> from lightning.pytorch import Trainer >>> from lightning.pytorch.callbacks import OnExceptionCheckpoint >>> trainer = Trainer(callbacks=[OnExceptionCheckpoint(".")])