VectorDBBench在windows的調試
VectorDBBench是一款向量數據庫基準測試工具,支持milvus、Zilliz Cloud、Elastic Search、Qdrant Cloud、Weaviate Cloud 、 PgVector、PgVectorRS等,可以測試其QPS、時延、recall。
VectorDBBench是一款使用python編寫的工具,使用了streamlit框架。Streamlit
是一個用于機器學習、數據可視化的 Python 框架,它能幾行代碼就構建出一個精美的在線 app 應用。
因為本人想要研究VectorDBBench的QPS、時延、recall算法,因此需要調試此應用,下面介紹如何進行調試。
調試環境
windows10
PyCharm 2023.3.5 (Professional Edition)
conda(python3.11.7)
VectorDBBench0.0.9
debug設置
script這一項的streamlit是linux下的腳本:
#!/root/anaconda3/envs/vdbtest/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from streamlit.web.cli import main
if __name__ == '__main__':sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])sys.exit(main())
參數項:
run /pycode/VectorDBBench-0.0.9/vectordb_bench/frontend/vdb_benchmark.py --logger.level info --theme.base light --theme.primaryColor "#3670F2" --theme.secondaryBackgroundColor "#F0F2F6"
設置日志級別為debug:
這時候就可以進行調試了。
需要注意一個問題:
點擊啟動跑完整個測試流程沒有問題,當點擊debug調試的時候,__init__.py
的NUM_CONCURRENCY設置的并發稍微多一點點,運行過程中就會報錯。測試設置為[1,2]推遲報錯時機。
Exception ignored in tp_clear of: <class 'memoryview'>
BufferError: memoryview has 1 exported buffer
暫不清楚為什么debug會出現這種情況。