1

is there anyone knows the lifetime of files on the colab virtual machine? for example, in a colab notebook, I save the data to a csv file as:

data.to_csv('data.csv')

then how long will the data.csv exist?

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.

northcheng
  • 473
  • 1
  • 4
  • 6

1 Answers1

2

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. An easier method is to use a FUSE interface to Drive so that you can automatically sync files as they are saved normally.

For an example, see: https://colab.research.google.com/drive/1srw_HFWQ2SMgmWIawucXfusGzrj1_U0q

Bob Smith
  • 36,107
  • 11
  • 98
  • 91