paddle.reader.multiprocess_reader 中的线程不会正常退出
Created by: kolinwei
按照face_detection中定义的reader。如果,中途退出训练过程的话,程序不会退出 py_reader.start() batch_num=5 for batch_id in range(batch_num + 1): fetch_vars = exe.run( fetch_list = [v.name for v in fetches]) fetch_vars = [np.mean(np.array(v)) for v in fetch_vars] train_info.append(fetch_vars[0]) if batch_id == batch_num: break ctrl +C 发现有几个线程未退出。 Error in sys.exitfunc: Traceback (most recent call last): File "/root/.jumbo/lib/python2.7/atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "/root/.jumbo/lib/python2.7/multiprocessing/util.py", line 295, in _exit_function p.join() File "/root/.jumbo/lib/python2.7/multiprocessing/process.py", line 145, in join res = self._popen.wait(timeout) File "/root/.jumbo/lib/python2.7/multiprocessing/forking.py", line 148, in wait return self.poll(0) File "/root/.jumbo/lib/python2.7/multiprocessing/forking.py", line 133, in poll pid, sts = os.waitpid(self.pid, flag) KeyboardInterrupt