Paperspace Gradient° Notebook, got DL1 Lesson1 running

I’ve just got DL1 Lesson1 running on a Paperspace Gradient° Notebook (as opposed to a VM), with their “Paperspace + Fast.AI 0.7.x” public base container. I’m switching between C2 for fiddling and P4000 for training.

I had to tweak lesson1.ipynb and wonder if this could be achieved simpler.

  1. added
    import sys
    sys.path.append ("…/…/")
    to get from fastai.imports import * working

  2. symlinked (cp -rs /datasets/fastai/dogscats /storage/datasets/fastai) dogscats dataset to /storage and changed PATH accordingly to “/storage/datasets/fastai/dogscats/”. Otherwise, the first model was failing when trying to create tmp directory under read-only ./dataset.
    I could just copy the dataset to /storage, but that would be wasting storage space (unless paperspace has a deduplication file system in the background ;).

  3. added %autosave 0 to get rid of .ipynb_checkpoints in dataset folder. Otherwise, the first model was failing encountering such a “class”.


Thanks! I hit the issue (again?) in Lesson4. Using your idea, I added the following notebook cell just above the get_model() call that caused the error.

# Workaround for read-only filesystem on paperspace: symlink the data to /storage/...
os.makedirs('/storage/datasets/fastai', exist_ok=True)
!cp -rs /datasets/fastai/aclImdb /storage/datasets/fastai
md.path = '/storage/datasets/fastai/ai/aclImdb/'
1 Like