<p>有没有人想出一种方法让文件在Google的<a href="https://colab.research.google.com" rel="noreferrer">newly open sourced Colaboratory</a>中跨会话持久化?</p>
<p>使用示例笔记本,我成功地验证和传输了Google驱动器实例中的csv文件,并将它们保存在/tmp、my~和~/datalab中。熊猫也可以从磁盘上很好地读取它们。但一旦会话超时,看起来整个文件系统都被删除了,一个新的VM就启动了,而没有下载文件。</p>
<p>考虑到谷歌的<a href="https://research.google.com/colaboratory/faq.html" rel="noreferrer">Colaboratory Faq</a>,我想这并不奇怪:</p>
<blockquote>
<p>Q: Where is my code executed? What happens to my execution state if I close the browser window?</p>
<p>A: Code is executed in a virtual machine dedicated to your account. Virtual machines are recycled when idle for a while, and have a maximum lifetime enforced by the system.</p>
</blockquote>
<p>考虑到这一点,也许这是一个功能(即“使用谷歌云存储,这在Colaboratory中工作得很好”)?当我第一次使用这个工具时,我<em>希望</em>我的文件/Colab笔记本中的任何.csv文件也会加载到运行笔记本的VM实例中:/</p>