Saving model to Kaggle folder

I’ve been working on classifying a dataset on kaggle with x-rays that are either normal or show pneumonia. The dataset is read-only and so when trying, 'stage-1'), I get the error set learn.model_dir attribute in Learner to a full libpath path that is writable. I’ve tried googling this error with not much luck. I’m hoping someone on the forum here can suggest a solution.

Edit: I found the solution was to use learn.model_dir='/kaggle/working/' which saves the model in the working directory.

Perhaps this Q&A is better fitted to the Kaggle discussion boards or maybe this can provide help to others on here? Please let me know if this should be removed or not.


This was useful. I’m in lesson 3, and couldn’t find the location the models were stored in and had to retrain (> 30 minutes). So forcing the models to a know location seems to work find, and I don’t have to retrain each time I go thru the lessons.

This is Indeed Useful, Thanks :slight_smile:

This helps me. Thank you.

1 Like