Closed johnpaulbin closed 2 years ago
Not quite sure how to do this. Any suggestions?
Wrapping the if else statement with a try catch, making sure exception is KeyboardInterrupt
try:
main()
except KeyboardInterrupt:
print("Graceful shutdown, saving current checkpoint")
ahh makes sense. want to put in a PR?
fixed in latest pr
Sometimes, things don't go your way, and your already deep down the rabbit hole. Maybe you've spent 2 hours training a model, and you just realized now you want to change some config, but you have set your epoch checkpoint interval to be waay too much. Would it be possible to catch a keyboard interrupt while training, to do a graceful shutdown (save checkpoint n such?)