我如何得知我剩余的Google合作时间? [英] How can I tell how much time I have left in my Google Colaboratory session?

查看:111
本文介绍了我如何得知我剩余的Google合作时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google Colab会话最长会在12个小时后过期.由于这个原因,我不知道是值得开始训练我的模型还是等到会话到期以开始全新的会话.

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?

谢谢.

推荐答案

import time, psutil
uptime = time.time() - psutil.boot_time()
remain = 12*60*60 - uptime

这篇关于我如何得知我剩余的Google合作时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆