Reputation: 989
A Google Colab session expires after 12 hours at the longest. For this reason, I don't know whether it's worth starting to train my model or wait until the session has expired to start a brand new session.
Is there a way to know how long my session has been active for, or, equivalently, how much time I have left on my session?
Thanks.
Upvotes: 8
Views: 9483
Reputation: 6079
Menu -> Runtime -> View runtime logs
Look at the start time (may be on the last page), then add 12 hours.
Upvotes: 4
Reputation: 40878
import time, psutil
uptime = time.time() - psutil.boot_time()
remain = 12*60*60 - uptime
Upvotes: 7