QAnything 当出现这个问题时,程序将无法正常运行,

zzlelutf  于 6个月前  发布在  其他
关注(0)|答案(6)|浏览(130)

是否有关于该错误的issue或讨论?
我已经搜索过已有的issues和讨论
该问题是否在FAQ中有解答?
我已经搜索过FAQ
当前行为
Traceback (most recent call last):
File "handle_request", line 132, in handle_request
"_asgi_lifespan",
File "/usr/local/miniconda3/lib/python3.10/site-packages/sanic/response/types.py", line 547, in stream
await self.streaming_fn(self)
File "/usr/QAnything/qanything_kernel/qanything_server/handler.py", line 398, in generate_answer
async for resp, next_history in local_doc_qa.get_knowledge_based_answer(custom_prompt=custom_prompt,
File "/usr/QAnything/qanything_kernel/core/local_doc_qa.py", line 262, in get_knowledge_based_answer
retrieval_documents = await self.retrieve(query, kb_ids, need_web_search=need_web_search)
File "/usr/QAnything/qanything_kernel/core/local_doc_qa.py", line 246, in retrieve
retrieval_documents = await self.local_doc_search(query, kb_ids)
File "/usr/QAnything/qanything_kernel/core/local_doc_qa.py", line 128, in local_doc_search
retrieval_documents = self.rerank_documents(query, retrieval_documents)
File "/usr/QAnything/qanything_kernel/core/local_doc_qa.py", line 238, in rerank_documents
scores = self.local_rerank_backend.predict(query, [doc.page_content for doc in source_documents])
File "/usr/QAnything/qanything_kernel/utils/general_utils.py", line 73, in inner
res = func(*arg, **kwargs)
File "/usr/QAnything/qanything_kernel/connector/rerank/rerank_backend.py", line 91, in predict
tot_batches, merge_inputs_idxs_sort = self.tokenize_preproc(query, passages)
File "/usr/QAnything/qanything_kernel/connector/rerank/rerank_backend.py", line 70, in tokenize_preproc
qp_merge_inputs = self.merge_inputs(query_inputs, passage_inputs)
File "/usr/QAnything/qanything_kernel/connector/rerank/rerank_backend.py", line 46, in merge_inputs
chunk1['attention_mask'].append(chunk2['attention_mask'][0])
IndexError: list index out of range

f4t66c6m

f4t66c6m1#

遇到同样的问题

bz4sfanl

bz4sfanl2#

加一,关键是偶尔出现,还不好复现,想debug都没得搞。

iklwldmw

iklwldmw3#

加一,很闹心,希望赶紧解决😭😭😭

q0qdq0h2

q0qdq0h24#

我也遇到了这个问题。

相关问题