jupyter-notebook - 为什么 Google Colab 会在 12 小时前随机断开连接

标签 jupyter-notebook google-colaboratory

有时我的 Colab 笔记本会在 12 小时前断开连接,我很好奇为什么会这样。有时我会收到一条消息“运行时断开连接”。

其他时间没有消息。重新连接我的笔记本后,它似乎有一段时间没有运行(因为笔记本没有显示忙)。此外,我的 tensorflow .meta 和 .data 文件在过去 8 个小时左右的谷歌驱动器上有 6 个小时没有更新。

我在 SO 上发现了一些与我的问题类似的问题,但其他人的情况似乎是他们在初始化时“卡住”,但我的笔记本没有“卡住”。它与复选标记连接。我什至尝试重新启动运行时,但仍然没有迹象表明我的笔记本以任何方式连接到我的旧 VM。

编辑:google colab VM 是否以任何方式“可抢占”?我知道谷歌计算引擎有可以随时断开连接的“可抢占”机器。由于付费客户使用可抢占式机器,因此对我来说,colab - 由非付费客户使用 - 也是可抢占的。我没有找到任何支持 colab 声明的文档。

最佳答案

Google Colab 不适用于长时间运行的任务。从 Colab 常见问题网页(重点是我的):

Colaboratory is intended for interactive use. Long-running background computations, particularly on GPUs, may be stopped. Please do not use Colaboratory for cryptocurrency mining. Doing so is unsupported and may result in service unavailability. We encourage users who wish to run continuous or long-running computations through Colaboratory’s UI to use a local runtime.



根据我的经验,“长时间运行的计算”包括训练神经网络以及运行超过两三个小时的 bash 命令。如上所述,这些类型的长时间运行的任务可能会导致服务不可用,这种情况通常持续不超过几个小时。

关于jupyter-notebook - 为什么 Google Colab 会在 12 小时前随机断开连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52670872/

相关文章:

python-3.x - Jupyter 安装环境

python - Jupyter笔记本: TypeError: unsupported operand type(s) for/: 'str' and 'int'

python-3.x - python中文本清理/处理的管道

python - 我如何使用 spark-env.sh.template 在 Python 3 中设置 Pyspark

amazon-web-services - Amazon Sagemaker Notebook 实例在我注销时停止执行

google-colaboratory - Colab 不支持符号链接(symbolic link) (ln) 操作

google-colaboratory - Google Colab 中的(实际)功率级别是什么意思?

google-colaboratory - 我可以禁用 Colab 组合吗

google-cloud-platform - 如何查看您的 GoogleColab 运行的区域?

google-drive-api - 在运行时在 Google Colab 中重新验证或删除验证 Pydrive