TPlinker-joint-extraction
TPlinker-joint-extraction copied to clipboard
BrokenPipeError: [Errno 32] Broken pipe
RuntimeError: An attempt has been made to start a new process before the current process has finished its bootstrapping phase.
This probably means that you are not using fork to start your
child processes and you have forgotten to use the proper idiom
in the main module:
if __name__ == '__main__':
freeze_support()
...
The "freeze_support()" line can be omitted if the program
is not going to be frozen to produce an executable.
Traceback (most recent call last):
File "C:/Users/ylx/PycharmProjects/TPlinker-joint-extraction-master/tplinker/train.py", line 610, in
File "C:/Users/ylx/PycharmProjects/TPlinker-joint-extraction-master/tplinker/train.py", line 473, in train
for batch_ind, batch_train_data in enumerate(dataloader):
File "C:\ProgramData\Anaconda3\envs\tplinker\lib\site-packages\torch\utils\data\dataloader.py", line 291, in iter
return _MultiProcessingDataLoaderIter(self)
File "C:\ProgramData\Anaconda3\envs\tplinker\lib\site-packages\torch\utils\data\dataloader.py", line 737, in init
w.start()
File "C:\ProgramData\Anaconda3\envs\tplinker\lib\multiprocessing\process.py", line 112, in start
self._popen = self._Popen(self)
File "C:\ProgramData\Anaconda3\envs\tplinker\lib\multiprocessing\context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "C:\ProgramData\Anaconda3\envs\tplinker\lib\multiprocessing\context.py", line 322, in _Popen
return Popen(process_obj)
File "C:\ProgramData\Anaconda3\envs\tplinker\lib\multiprocessing\popen_spawn_win32.py", line 89, in init
reduction.dump(process_obj, to_child)
File "C:\ProgramData\Anaconda3\envs\tplinker\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
BrokenPipeError: [Errno 32] Broken pipe
你解决了吗?好兄弟
我在train.py的最后一行,train_n_valid前面加了if name == main:,好像解决了
num_works改成0试试