Comments (3)
The error you're encountering, "AttributeError: 'NoneType' object has no attribute 'acquire'", indicates that the ThreadSafeFaiss
object is not properly initialized at the time you're trying to acquire a lock on it. This problem arises when the load_vector_store
method returns None
instead of a valid ThreadSafeFaiss
instance. To address this issue, ensure that the embeddings or vector stores are properly initialized and loaded before they are accessed. Here's a more focused approach to resolve the issue:
-
Check Initialization and Loading: Confirm that the vector stores are correctly initialized and loaded before any access attempts. This involves ensuring that the
load_vector_store
method always returns a fully initializedThreadSafeFaiss
instance. -
Implement Error Handling and Logging: Add error handling and logging within the initialization and loading processes. This will help identify and troubleshoot issues more effectively.
-
Ensure Object Readiness with
wait_for_loading
: Before using the embeddings or vector store, utilize thewait_for_loading
method to ensure the object is fully loaded and ready for use. -
Review Thread Safety and Concurrency: Given the concurrent nature of your application, it's crucial to ensure that all operations on shared resources are thread-safe to avoid race conditions or deadlocks.
By following these steps, you should be able to mitigate the intermittent failures related to embeddings not being loaded properly when handling multiple concurrent requests with vllm acceleration.
Details
Sources
- 使用VLLM加速之后就这样了,知识库查询有结果,但是模型并没有返回结果
- server/knowledge_base/kb_service/faiss_kb_service.py
- server/knowledge_base/kb_cache/faiss_cache.py
- server/knowledge_base/kb_cache/base.py
- startup.py
- configs/server_config.py.example
About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
To continue the conversation, mention @dosu.
from langchain-chatchat.
这个框架没做并发啊
from langchain-chatchat.
这个框架没做并发啊
有计划做并发处理吗?
from langchain-chatchat.
Related Issues (20)
- 添加PDF文件到知识库时报错: HOT 2
- [BUG] 知识库管理页面查看文档报错:The truth value of a DataFrame is ambiguous HOT 1
- 服务启动和知识库初始化顺序
- linux环境下,知识库上传并解析.doc文件报错,不支持解析.doc文件 HOT 1
- [BUG] 数据上传失败,无法添加到向量库中
- RapidOCRPDFLoader 解析pdf 出现乱码的情况
- 解决了吗,同样遇到这样的问题
- [BUG] 我使用chatglm3-6b和azure-api,他们都有function call功能,我要如何在/chat/chat接口上使用tools/functions
- 加载Qwen1.5-7B-Chat-int4 效果不好 HOT 6
- 无法对docker-talentai-python-chat-test\server\chat\knowledge_base_chat.py 进行debug,print 和logging 均无效
- 多个langchain如何配置collection共用同一个milvus集群
- API通信超时,请确认已启动FastChat与API服务(详见Wiki '5. 启动 API 服务或 Web UI')。(timed out) HOT 2
- cannot import name 'legacy' from 'llama_index'
- [BUG]httpcore.RemoteProtocolError: peer closed connection without sending complete message body (incomplete chunked read)
- 配置好vllm配置之后启动startup.py时候遇到一个问题,似乎是缺少一个参数配置,具体报错如下
- 运行后卡柱不动
- 在初始化过程中,显存爆了 HOT 1
- 知识库匹配需要原文回答,而不是润色的内容
- 这个项目中的fastapi 怎么在vscode 调试时 重载代码? uvicorn --reload时报错
- 知识库问答调用add_message_to_db 无法保存response
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from langchain-chatchat.