Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: can't pickle _thread.RLock objects #69

Open
c0derm4n opened this issue May 26, 2020 · 1 comment
Open

TypeError: can't pickle _thread.RLock objects #69

c0derm4n opened this issue May 26, 2020 · 1 comment

Comments

@c0derm4n
Copy link

File "/media/huaxin/tcl2/nlp/dumingyu_project/bertlk/web_service/advanced_deploy_api.py", line 76, in
streamer = Streamer(model.predict, batch_size=8, max_latency=0.1, worker_num=1)
File "/media/huaxin/tcl2/nlp/dumingyu_project/bertlk/web_service/service_streamer.py", line 296, in init
self._setup_gpu_worker()
File "/media/huaxin/tcl2/nlp/dumingyu_project/bertlk/web_service/service_streamer.py", line 311, in _setup_gpu_worker
p.start()
File "/media/huaxin/tcl2/nlp/anaconda3/lib/python3.6/multiprocessing/process.py", line 105, in start
self._popen = self._Popen(self)
File "/media/huaxin/tcl2/nlp/anaconda3/lib/python3.6/multiprocessing/context.py", line 284, in _Popen
return Popen(process_obj)
File "/media/huaxin/tcl2/nlp/anaconda3/lib/python3.6/multiprocessing/popen_spawn_posix.py", line 32, in init
super().init(process_obj)
File "/media/huaxin/tcl2/nlp/anaconda3/lib/python3.6/multiprocessing/popen_fork.py", line 19, in init
self._launch(process_obj)
File "/media/huaxin/tcl2/nlp/anaconda3/lib/python3.6/multiprocessing/popen_spawn_posix.py", line 47, in _launch
reduction.dump(process_obj, fp)
File "/media/huaxin/tcl2/nlp/anaconda3/lib/python3.6/multiprocessing/reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
TypeError: can't pickle _thread.RLock objects

@yjiangling
Copy link

@Meteorix @pku-wuwei Same Error, please give some help, thanks a lot!

Traceback (most recent call last):
File "asr_api.py", line 92, in
streamer=Streamer(model.predict,batch_size=4,max_latency=0.01)
File "/media/huaxin/tcl1/asr/yujiangling/lib/python3.6/site-packages/service_streamer/service_streamer.py", line 267, in init
self._setup_gpu_worker()
File "/media/huaxin/tcl1/asr/yujiangling/lib/python3.6/site-packages/service_streamer/service_streamer.py", line 280, in _setup_gpu_worker
p.start()
File "/media/huaxin/tcl1/asr/anaconda3/lib/python3.6/multiprocessing/process.py", line 105, in start
self._popen = self._Popen(self)
File "/media/huaxin/tcl1/asr/anaconda3/lib/python3.6/multiprocessing/context.py", line 284, in _Popen
return Popen(process_obj)
File "/media/huaxin/tcl1/asr/anaconda3/lib/python3.6/multiprocessing/popen_spawn_posix.py", line 32, in init
super().init(process_obj)
File "/media/huaxin/tcl1/asr/anaconda3/lib/python3.6/multiprocessing/popen_fork.py", line 19, in init
self._launch(process_obj)
File "/media/huaxin/tcl1/asr/anaconda3/lib/python3.6/multiprocessing/popen_spawn_posix.py", line 47, in _launch
reduction.dump(process_obj, fp)
File "/media/huaxin/tcl1/asr/anaconda3/lib/python3.6/multiprocessing/reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
TypeError: can't pickle LockType objects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants