Bug + fix in dl1 datasets.py (at least on paperspace) - generates invalid folder (OSError) error with custom data

Hi all,
Using PaperSpace gradient notebook, I hit an error where the dataset loader was trying to pull in .ipynb_checkpoints directories, and thus causing it to fail with:
OSError: Is a directory: /storage/…/.ipynb_checkpoints

This is on paperspace, so not clear how their code is compared to github version, etc. so I’ll just post here and not go to deeper with it.
This is the fix I made to get it working - since this is v.7, I’m assuming it’s already fixed in v1 but if anyone hits, here’s the fix I made (in bold below):
File: Datasets.py
def read_dirs(path, folder):
Fetches name of all files in path in long form, and labels associated by extrapolation of directory names.
lbls, fnames, all_lbls = [], [], []
full_path = os.path.join(path, folder)
for lbl in sorted(os.listdir(full_path)):
if lbl not in (’.ipynb_checkpoints’,’.DS_Store’):
for fname in os.listdir(os.path.join(full_path, lbl)):
if fname not in ('.ipynb_checkpoints','.DS_Store'): #add in .ipynb_checkpoints to exclude…
fnames.append(os.path.join(folder, lbl, fname))
return fnames, lbls, all_lbls

That lets me get past the error and get a working data set. Basically needs to verify it doesn’t try and attach the checkpoint as a valid source for the data set list.