-
Notifications
You must be signed in to change notification settings - Fork 1k
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
IndexError: list index out of range 出现这个问题程序就不可用了 #366
Comments
遇到同样的问题 |
加一,关键是偶尔出现,还不好复现,想debug都没得搞 |
加一,很闹心,希望赶紧解决😭😭😭 |
我也出现了这个问题 |
加一 |
1 similar comment
加一 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?
该问题是否在FAQ中有解答? | Is there an existing answer for this in FAQ?
当前行为 | Current Behavior
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
期望行为 | Expected Behavior
No response
运行环境 | Environment
QAnything日志 | QAnything logs
No response
复现方法 | Steps To Reproduce
No response
备注 | Anything else?
No response
The text was updated successfully, but these errors were encountered: