Hi, all, I’m new to the fastai library. I have a -trained- learner, which I’m trying to use to make predictions on a validation set, which consists of 100.000 samples, via the learner.get_preds(ds_type=DatasetType.Valid) method, yielding the following exception: “RuntimeError: received 0 items of ancdata”.
I read the GH issue (https://github.com/fastai/fastai/issues/23#) and tried the solution mentioned there resource.setrlimit(resource.RLIMIT_NOFILE, (4096, rlimit[1])), but with no success.
Add torch.multiprocessing.set_sharing_strategy('file_system') after importing Fastai. According to the blog post, the default option file_descriptor has a limitation on the number of open files, which caused the runtime error. And this solved my problem.
Thanks. Adding torch.multiprocessing.set_sharing_strategy(‘file_system’) below fastai worked for me. In case it does not work for someone, try delete any dataframe or restart your kernel and run it again.