randc
randc

Reputation: 51

Input/output error while using google colab to read Google dirve files

I am training my model with colab. I have encountered this error more than once, when I use the enumeration function in colab to iterate my training data on Google Drive. The time when the error occurred is uncertain. The error may be after training a few epoch, or it may happen in several iterations.

I tried to modify the path of the dataset in Google Drive, or reduce the batchsize, these have no effect.

   192     batch_time = AverageMeter()
   193     losses = AverageMeter()
--> 194     for i, sample in enumerate(train_loader):
   195         start = time.time()
   196         input = sample['image'].cuda()
File "/usr/local/lib/python3.6/dist-packages/PIL/Image.py", line 2530, in open
    fp = builtins.open(filename, "rb")
OSError: [Errno 5] Input/output error: './nyud_cropped/train_labels/001187.png'

Upvotes: 5

Views: 2166

Answers (2)

user21064051
user21064051

Reputation:

the same error appeared to me when I executed the copy command that it can't access the folder that contains the data set due to I_O error and google drive had time out

Upvotes: 0

Bob Smith
Bob Smith

Reputation: 38579

My recommendation is to first copy data out of Drive to the ephemeral VM machine before training. That may also speed things up.

Upvotes: 3

Related Questions