-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support graceful training cleanup after Keyboard Interrupt #795
Comments
awesome, let's do it |
@jeremyjordan can we get it into this release? :) |
when’s the release? planning to get to it this weekend |
feb 21 |
sure, shouldn't be a problem then :) |
Hey guys, I am currently training a model on Sagemaker and have added a notebook shutdown code within the |
@lezwon Hmm yeah, that's not ideal. Do you mind creating a new issue (you can reference this one) with the problem and I can draft up a PR to address it? |
🚀 Feature
In the training loop, we should catch
KeyboardInterrupt
exceptions and enter a graceful termination (ie. runon_training_end
, print profiler report, etc).Motivation
Sometimes I'll train a model and just let it run until something interesting happens or my loss has converged. Exiting via "Ctrl + C" can be easier than waiting for "EarlyStopping" to trigger in some cases. However, I may still want certain things to occur (eg. printing out the profiler summary) after stopping training.
Salesforce's AWD-LSTM has an example of this feature implemented here.
Pitch
Figure out what actions we want to run after a KeyboardInterrupt. Then adjust the training loop to catch this exception and ensure the aforementioned actions still run afterwards.
The text was updated successfully, but these errors were encountered: