Reputation: 1116
I often start a training run before going to bed and I'd like to release the runtime from within the last cell of my notebook. How can I do this?
My motivation is simply to save the extra 90 minutes of usage before the idle timeout kills the runtime anyway, so I accumulate fewer GPU hours and stay at a higher priority... (Maybe that's a pointless goal...)
Upvotes: 13
Views: 12571
Reputation: 1611
kill won't delete the runtime. And you'll still be charged for it. To disconnect and delete use:
from google.colab import runtime runtime.unassign()
Source (and also checked): https://www.reddit.com/r/GoogleColab/comments/xtj2be/dear_googlecolab_boss_i_want/
Upvotes: 28
Reputation: 12222
To post the answer mentioned in the comments above (taken from here):
Run !kill -9 -1
from within a cell.
Upvotes: 1