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
train_n_valid(train_dataloader, valid_dataloader, optimizer, scheduler, hyper_parameters["epochs"])
File "C:/Users/ylx/PycharmProjects/TPlinker-joint-extraction-master/tplinker/train.py", line 570, in train_n_valid
train(train_dataloader, ep)
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
RuntimeError: An attempt has been made to start a new process before the current process has finished its bootstrapping phase.
Traceback (most recent call last): File "C:/Users/ylx/PycharmProjects/TPlinker-joint-extraction-master/tplinker/train.py", line 610, in
train_n_valid(train_dataloader, valid_dataloader, optimizer, scheduler, hyper_parameters["epochs"])
File "C:/Users/ylx/PycharmProjects/TPlinker-joint-extraction-master/tplinker/train.py", line 570, in train_n_valid
train(train_dataloader, ep)
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