MCPcopy Create free account
hub / github.com/adobe-research/custom-diffusion / on_keyboard_interrupt

Method on_keyboard_interrupt

train.py:454–458  ·  view source on GitHub ↗
(self, trainer, pl_module)

Source from the content-addressed store, hash-verified

452 self.lightning_config = lightning_config
453
454 def on_keyboard_interrupt(self, trainer, pl_module):
455 if trainer.global_rank == 0:
456 print("Summoning checkpoint.")
457 ckpt_path = os.path.join(self.ckptdir, "last.ckpt")
458 trainer.save_checkpoint(ckpt_path)
459
460 def on_pretrain_routine_start(self, trainer, pl_module):
461 if trainer.global_rank == 0:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected