Add checkpoint saving on graceful shutdown (ctr+c) (#3067)
This commit is contained in:
parent
f43028f3ae
commit
7933a1121c
|
@ -1132,6 +1132,10 @@ class TrainerTrainLoopMixin(ABC):
|
|||
|
||||
self._teardown_already_run = True
|
||||
|
||||
# Save latest checkpoint
|
||||
log.info('Saving latest checkpoint..')
|
||||
self.check_checkpoint_callback(should_check_val=False)
|
||||
|
||||
# Train end events
|
||||
with self.profiler.profile('on_train_end'):
|
||||
# callbacks
|
||||
|
|
Loading…
Reference in New Issue