My code with pytorch has been working fine till now but for last month or so I have been receiving an OS error while using dataloader. Interestingly this error is random and is not repeatable. I tried upgrading to pytorch 0.4 but still facing the same problem. I would appreciate a solution as this is being a menace in my work.
Thanks
Traceback (most recent call last):
File “./vanilla_classification.py”, line 139, in 
for data in trainloader:
File “/usr/local/lib/python2.7/dist-packages/torch/utils/data/dataloader.py”, line 280, in next
idx, batch = self._get_batch()
File “/usr/local/lib/python2.7/dist-packages/torch/utils/data/dataloader.py”, line 259, in _get_batch
return self.data_queue.get()
File “/usr/lib/python2.7/multiprocessing/queues.py”, line 378, in get
return recv()
File “/usr/local/lib/python2.7/dist-packages/torch/multiprocessing/queue.py”, line 22, in recv
return pickle.loads(buf)
File “/usr/lib/python2.7/pickle.py”, line 1388, in loads
return Unpickler(file).load()
File “/usr/lib/python2.7/pickle.py”, line 864, in load
dispatchkey
File “/usr/lib/python2.7/pickle.py”, line 1139, in load_reduce
value = func(*args)
File “/usr/local/lib/python2.7/dist-packages/torch/multiprocessing/reductions.py”, line 68, in rebuild_storage_fd
fd = multiprocessing.reduction.rebuild_handle(df)
File “/usr/lib/python2.7/multiprocessing/reduction.py”, line 157, in rebuild_handle
new_handle = recv_handle(conn)
File “/usr/lib/python2.7/multiprocessing/reduction.py”, line 83, in recv_handle
return _multiprocessing.recvfd(conn.fileno())
OSError: [Errno 4] Interrupted system call
If you suspect this is an IPython bug, please report it at:
https://github.com/ipython/ipython/issues 10
or send an email to the mailing list at ipython-dev@python.org
You can print a more detailed traceback right now with “%tb”, or use “%debug”
to interactively debug it.
Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
%config Application.verbose_crash=True
Exception NameError: “global name ‘FileNotFoundError’ is not defined” in <bound method _DataLoaderIter.del of <torch.utils.data.dataloader._DataLoaderIter object at 0x7fda56c31790>> ignored