FlagEmbedding icon indicating copy to clipboard operation
FlagEmbedding copied to clipboard

多线程报错问题

Open tdtgi opened this issue 8 months ago • 2 comments

Traceback (most recent call last): File "/xxx/anaconda/envs/LLM/lib/python3.10/site-packages/FlagEmbedding/abc/inference/AbsReranker.py", line 229, in del File "/xxx/anaconda/envs/LLM/lib/python3.10/site-packages/FlagEmbedding/abc/inference/AbsReranker.py", line 88, in stop_self_pool File "/xxx/anaconda/envs/LLM/lib/python3.10/site-packages/FlagEmbedding/abc/inference/AbsReranker.py", line 350, in stop_multi_process_pool File "/xxx/anaconda/envs/LLM/lib/python3.10/multiprocessing/process.py", line 133, in terminate File "/xxx/anaconda/envs/LLM/lib/python3.10/multiprocessing/popen_fork.py", line 57, in terminate AttributeError: 'NoneType' object has no attribute 'SIGTERM'

tdtgi avatar Mar 28 '25 21:03 tdtgi

这个是结束的时候回收pool报的,一般是程序结束时提醒的,不会影响代码的正常运行 可以在代码最后加一个del model来避免输出这些报错信息

545999961 avatar Apr 10 '25 06:04 545999961

建议代码在回收线程的时候增加线程的存活状态,当线程处于stop状态时,不要进行terminate()引发异常

fivehaitao avatar Jul 08 '25 08:07 fivehaitao