LipNet icon indicating copy to clipboard operation
LipNet copied to clipboard

multiprocessing issue : Exception in thread

Open idigizen opened this issue 7 years ago • 1 comments

Hi, I am trying to run train.py for random_split and following error is coming.

train.py:73: UserWarning: Update your fit_generator call to the Keras 2 API: fit_generator(workers=1, validation_steps=200.0, use_multiprocessing=True, max_queue_size=1, validation_data=<lipnet.he..., generator=<lipnet.he..., steps_per_epoch=800.0, initial_epoch=0, callbacks=[<keras.ca..., verbose=1, epochs=20) pickle_safe=True) Epoch 1/20 Exception in thread Thread-2: Traceback (most recent call last): File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\threading.py", line 923, in _bootstrap_inner self.run() File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\threading.py", line 871, in run self._target(*self._args, **self._kwargs) File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\site-packages\keras\utils\data_utils.py", line 666, in _run with closing(self.executor_fn(_SHARED_SEQUENCES)) as executor: File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\site-packages\keras\utils\data_utils.py", line 661, in initargs=(seqs, self.random_seed)) File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\multiprocessing\context.py", line 118, in Pool context=self.get_context()) File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\multiprocessing\pool.py", line 168, in init self._repopulate_pool() File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\multiprocessing\pool.py", line 233, in _repopulate_pool w.start() File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\multiprocessing\process.py", line 105, in start self._popen = self._Popen(self) File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\multiprocessing\context.py", line 313, in _Popen return Popen(process_obj) File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\multiprocessing\popen_spawn_win32.py", line 66, in init reduction.dump(process_obj, to_child) File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\multiprocessing\reduction.py", line 59, in dump ForkingPickler(file, protocol).dump(obj) _pickle.PicklingError: Can't pickle <class '_thread.lock'>: attribute lookup lock on _thread failed Exception in thread Thread-3: Traceback (most recent call last): File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\threading.py", line 923, in _bootstrap_inner self.run() File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\threading.py", line 871, in run self._target(*self._args, **self._kwargs) File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\site-packages\keras\utils\data_utils.py", line 666, in _run with closing(self.executor_fn(_SHARED_SEQUENCES)) as executor: File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\site-packages\keras\utils\data_utils.py", line 661, in initargs=(seqs, self.random_seed)) File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\multiprocessing\context.py", line 118, in Pool context=self.get_context()) File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\multiprocessing\pool.py", line 168, in init self._repopulate_pool() File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\multiprocessing\pool.py", line 233, in _repopulate_pool w.start() File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\multiprocessing\process.py", line 105, in start self._popen = self._Popen(self) File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\multiprocessing\context.py", line 313, in _Popen return Popen(process_obj) File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\multiprocessing\popen_spawn_win32.py", line 66, in init reduction.dump(process_obj, to_child) File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\multiprocessing\reduction.py", line 59, in dump ForkingPickler(file, protocol).dump(obj) _pickle.PicklingError: Can't pickle <class '_thread.lock'>: attribute lookup lock on _thread failed

Using TensorFlow backend. Using TensorFlow backend. Traceback (most recent call last): File "", line 1, in Traceback (most recent call last): File "", line 1, in File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\multiprocessing\spawn.py", line 106, in spawn_main File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\multiprocessing\spawn.py", line 106, in spawn_main exitcode = _main(fd) File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\multiprocessing\spawn.py", line 116, in _main exitcode = _main(fd) File "C:\Users\z003z4fm\AppData\Local\Programs\Python\Python35\lib\multiprocessing\spawn.py", line 116, in _main self = pickle.load(from_parent) EOFError: Ran out of input self = pickle.load(from_parent) EOFError: Ran out of input

@rizkiarm , Can you please help to solve this issue.

idigizen avatar Oct 23 '18 08:10 idigizen

I am having the same issue. Using Windows 10 here, does migrating to Ubuntu fix this problem?

ghost avatar Jan 30 '19 05:01 ghost