简体   繁体   English

Google Colab:关于VM上文件的生存期

[英]Google Colab: about lifetime of files on VM

is there anyone knows the lifetime of files on the colab virtual machine? 有没有人知道colab虚拟机上文件的生存期? for example, in a colab notebook, I save the data to a csv file as: 例如,在colab笔记本中,我将数据保存为csv文件,如下所示:

data.to_csv('data.csv')

then how long will the data.csv exist? 那么data.csv将存在多长时间?

This is the scenario: I want to maintain and update over 3000 small datasets everyday, but it seems that the interaction between colab and google drive by using pydrive is pretty slow(as I need to check every dataset everyday), so if the lifetime of files on the virtual machine is long enough, I can update the files on virtual machine everyday(which would be much faster) then synchronize them to google drive several days a time rather than everyday. 这是这种情况:我想每天维护和更新3000多个小型数据集,但是似乎通过pydrive使用colab和google drive之间的交互非常慢(因为我需要每天检查每个数据集),因此如果虚拟机上的文件足够长,我可以每天更新虚拟机上的文件(速度会更快),然后每天(而不是每天)将它们同步到google驱动器。

VMs are discarded after a period of inactivity, so your best bet is to save files to Drive that you'd like to keep as generated. 闲置一段时间后,虚拟机将被丢弃,因此最好的选择是将文件保存到要保存的云端硬盘中。

With pydrive , this is possible, but a bit cumbersome. 使用pydrive可以实现,但是有点麻烦。 An easier method is to use a FUSE interface to Drive so that you can automatically sync files as they are saved normally. 一种更简单的方法是使用FUSE界面驱动器,以便您可以按照正常保存的方式自动同步文件。

For an example, see: https://colab.research.google.com/drive/1srw_HFWQ2SMgmWIawucXfusGzrj1_U0q 例如,请参见: https : //colab.research.google.com/drive/1srw_HFWQ2SMgmWIawucXfusGzrj1_U0q

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM