Sorry to bother you @sgugger, but I couldn’t find a solution. (I updated to 1.0.42)
So I did this:
class ImageItemList2(ImageItemList):
def open(self, fn):
return open_image_16bit2rgb(fn)
I created a databunch and when I do this
db.train_ds[0][0]
everything looks fine. But I get a broken pipe error after I try to load a batch. The dataloader is not created correctly.
- How can I fix this?
- How can I debug broken pipe errors?
BrokenPipeError Traceback (most recent call last)
in
1 dl = db.train_dl
2 dl2 = dl.dl
----> 3 next(iter(dl2))
\miniconda3\envs\f1\lib\site-packages\torch\utils\data\dataloader.py in iter(self)
817
818 def iter(self):
–> 819 return _DataLoaderIter(self)
820
821 def len(self):
\miniconda3\envs\f1\lib\site-packages\torch\utils\data\dataloader.py in init(self, loader)
558 # before it starts, and del tries to join but will get:
559 # AssertionError: can only join a started process.
–> 560 w.start()
561 self.index_queues.append(index_queue)
562 self.workers.append(w)
\miniconda3\envs\f1\lib\multiprocessing\process.py in start(self)
103 ‘daemonic processes are not allowed to have children’
104 _cleanup()
–> 105 self._popen = self._Popen(self)
106 self._sentinel = self._popen.sentinel
107 # Avoid a refcycle if the target function holds an indirect
\miniconda3\envs\f1\lib\multiprocessing\context.py in _Popen(process_obj)
221 @staticmethod
222 def _Popen(process_obj):
–> 223 return _default_context.get_context().Process._Popen(process_obj)
224
225 class DefaultContext(BaseContext):
\miniconda3\envs\f1\lib\multiprocessing\context.py in _Popen(process_obj)
320 def _Popen(process_obj):
321 from .popen_spawn_win32 import Popen
–> 322 return Popen(process_obj)
323
324 class SpawnContext(BaseContext):
\miniconda3\envs\f1\lib\multiprocessing\popen_spawn_win32.py in init(self, process_obj)
63 try:
64 reduction.dump(prep_data, to_child)
—> 65 reduction.dump(process_obj, to_child)
66 finally:
67 set_spawning_popen(None)
\miniconda3\envs\f1\lib\multiprocessing\reduction.py in dump(obj, file, protocol)
58 def dump(obj, file, protocol=None):
59 ‘’‘Replacement for pickle.dump() using ForkingPickler.’’’
—> 60 ForkingPickler(file, protocol).dump(obj)
61
62 #
BrokenPipeError: [Errno 32] Broken pipe