Pytorch dataloaders : OSError: [Errno 9] Bad file descriptor

From what I am able to see, it’s an EOF error and even before that it’s a bad file descriptor error which in this case looks like stemming from an attempt to close a file that wasn’t open in the first place. See this-

File “/opt/conda/lib/python3.8/site-packages/torch/utils/data/dataloader.py”, line 530, in next
os.close(new_fd)
OSError: [Errno 9] Bad file descriptor

this might help. Multiprocessing on windows is error prone due to many reasons like pickling etc. Potentially, check this.

Not sure though, if these links would solve your error.