-
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
Handle KeyboardInterrupt during training #2079
Comments
The least invasive change would be to save the result of sys.exc_info() for later examination. |
where would you save it, to logs? mind sending a PR? |
I already did, see above ;) As I said, using a callback narrows the possibility of memory issues. |
* Handle KeyboardInterrupt during training Fixes #2079. * chlog * Fix whitespace * Update callback_hook.py * Update base.py * Update training_loop.py * Update test_trainer.py * Update CHANGELOG.md Co-authored-by: Adrian Wälchli <[email protected]> * Update CHANGELOG.md * on_keyboard_interrupt Co-authored-by: Jirka <[email protected]> Co-authored-by: William Falcon <[email protected]> Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: Adrian Wälchli <[email protected]>
Is this feature up in the latest release - 0.9.0? I'm looking to automatically perform testing on Keyboard Interrupt but haven't been successful! |
git tag --contains fd1693e
0.8.0
0.8.1
0.8.2
0.8.3
0.8.4
0.8.5
0.9.0
0.9.1rc1 So: Yes. |
🚀 Feature
It should be possible to examine the stack if the training is interrupted manually.
Motivation
In my case, the program hangs at some point and I have to cancel it manually. Because Lightning catches KeyboardInterrupt, I don't get to know where the program was hanging.
Alternatives
sys.exc_info()
for later examination. This could introduce memory issues like memory leaks or circular references.sys.exc_info()
in the handler. This would make memory issues less likely.I will prepare a pull request for the third option.
The text was updated successfully, but these errors were encountered: