Any workaround for setting the path of fastai models on Kaggle Kernels?

Hello all. I am working with this dataset on Breast Pathology Images. I have directly opened a new kernel from the dataset’s homepage. I am using fastai for my deep learning experiments.

When I assign
learn = cnn_learner(data, models.resnet34, metrics=[accuracy]).to_fp16(),

I get an obvious error -

OSError: [Errno 30] Read-only file system: '../input/IDC_regular_ps50_idx5/models'

Any workaround of this, @wdhorton?

Hey, when creating your cnn_learner, just add the keyword argument (kwargs) model_dir to the function like this:
learner = cnn_learner(train_data, models.resnet18, metrics=accuracy, model_dir='/tmp/models')

1 Like

Thanks :slight_smile: