Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Permanently saving train data in google colab

Tags:

python

I have train data for 50GB.

My google drive capacity was 15GB so I upgraded it to 200GB and I uploaded my train data to my google drive

I connected to colab, but I can not find my train data in colab session, So I manually uploaded to colab which has 150GB capacity.

It says, it will be deleted when my colab connection is off.

It is impossible to save train data for colab permanently? And colab is free for 150GB?

And I see colab support nvidia P4 that is almost 5000$. can I use it 100% or it is shared to some portion(like 0.1%) to me? (When P4 is assigned to me)

like image 346
DIGMASTER97 Avatar asked Mar 02 '23 03:03

DIGMASTER97


1 Answers

The way you can do this is to mount your google drive into colab environment. Assume your files are kept under a folder named myfolder in your google drive. This is what I would suggest, do this before you read/write any file:

import os
from google.colab import drive
MOUNTPOINT = '/content/gdrive'
DATADIR = os.path.join(MOUNTPOINT, 'My Drive', 'myfolder')
drive.mount(MOUNTPOINT)

then, for example, your file bigthing.zip reside under myfolder in your google drive will be available in colab as path=os.path.join(DATADIR, 'bigthing.zip')

Similarly, when you save a file to a path like the above, you can find your file in Google Drive under the same directory.

like image 105
adrtam Avatar answered Mar 16 '23 02:03

adrtam