Skip to content

Commit

Permalink
Merge branch 'zilliztech:main' into aliyun_elasticsearch
Browse files Browse the repository at this point in the history
  • Loading branch information
xingshaomin authored Dec 17, 2024
2 parents f5904a5 + 279193c commit 57dd82c
Show file tree
Hide file tree
Showing 9 changed files with 420 additions and 30 deletions.
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,19 @@ All the database client supported

| Optional database client | install command |
|--------------------------|---------------------------------------------|
| pymilvus(*default*) | `pip install vectordb-bench` |
| all | `pip install vectordb-bench[all]` |
| pymilvus, zilliz_cloud (*default*) | `pip install vectordb-bench` |
| all (*clients requirements might be conflict with each other*) | `pip install vectordb-bench[all]` |
| qdrant | `pip install vectordb-bench[qdrant]` |
| pinecone | `pip install vectordb-bench[pinecone]` |
| weaviate | `pip install vectordb-bench[weaviate]` |
| elastic | `pip install vectordb-bench[elastic]` |
| pgvector | `pip install vectordb-bench[pgvector]` |
| elastic, aliyun_elasticsearch| `pip install vectordb-bench[elastic]` |
| pgvector, pgvectorscale, pgdiskann, alloydb | `pip install vectordb-bench[pgvector]` |
| pgvecto.rs | `pip install vectordb-bench[pgvecto_rs]` |
| pgvectorscale | `pip install vectordb-bench[pgvectorscale]` |
| pgdiskann | `pip install vectordb-bench[pgdiskann]` |
| redis | `pip install vectordb-bench[redis]` |
| memorydb | `pip install vectordb-bench[memorydb]` |
| chromadb | `pip install vectordb-bench[chromadb]` |
| awsopensearch | `pip install vectordb-bench[awsopensearch]` |
| alloydb | `pip install vectordb-bench[alloydb]` |
| awsopensearch | `pip install vectordb-bench[opensearch]` |
| aliyun_opensearch | `pip install vectordb-bench[aliyun_opensearch]` |

### Run

Expand Down
40 changes: 22 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,31 +55,35 @@ all = [
"pinecone-client",
"weaviate-client",
"elasticsearch",
"pgvector",
"pgvecto_rs[psycopg3]>=0.2.2",
"sqlalchemy",
"redis",
"chromadb",
"pgvector",
"psycopg",
"psycopg-binary",
"opensearch-dsl==2.1.0",
"opensearch-py==2.6.0",
"pgvecto_rs[psycopg3]>=0.2.2",
"opensearch-dsl",
"opensearch-py",
"memorydb",
"alibabacloud_ha3engine_vector",
"alibabacloud_searchengine20211025",
]

qdrant = [ "qdrant-client" ]
pinecone = [ "pinecone-client" ]
weaviate = [ "weaviate-client" ]
elastic = [ "elasticsearch" ]
pgvector = [ "psycopg", "psycopg-binary", "pgvector" ]
pgvectorscale = [ "psycopg", "psycopg-binary", "pgvector" ]
pgdiskann = [ "psycopg", "psycopg-binary", "pgvector" ]
alloydb = [ "psycopg", "psycopg-binary", "pgvector"]
pgvecto_rs = [ "pgvecto_rs[psycopg3]>=0.2.2" ]
redis = [ "redis" ]
memorydb = [ "memorydb" ]
chromadb = [ "chromadb" ]
awsopensearch = [ "awsopensearch" ]
zilliz_cloud = []
qdrant = [ "qdrant-client" ]
pinecone = [ "pinecone-client" ]
weaviate = [ "weaviate-client" ]
elastic = [ "elasticsearch" ]
# For elastic and aliyun_elasticsearch

pgvector = [ "psycopg", "psycopg-binary", "pgvector" ]
# for pgvector, pgvectorscale, pgdiskann, and, alloydb

pgvecto_rs = [ "pgvecto_rs[psycopg3]>=0.2.2" ]
redis = [ "redis" ]
memorydb = [ "memorydb" ]
chromadb = [ "chromadb" ]
opensearch = [ "opensearch-py" ]
aliyun_opensearch = [ "alibabacloud_ha3engine_vector", "alibabacloud_searchengine20211025"]

[project.urls]
"repository" = "https://github.com/zilliztech/VectorDBBench"
Expand Down
2 changes: 1 addition & 1 deletion vectordb_bench/backend/cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ class Performance1536D50K(PerformanceCase):
description: str = """This case tests the search performance of a vector database with a medium 50K dataset (<b>OpenAI 50K vectors</b>, 1536 dimensions), at varying parallel levels.
Results will show index building time, recall, and maximum QPS."""
load_timeout: float | int = 3600
optimize_timeout: float | int | None = 15 * 60
optimize_timeout: float | int | None = config.OPTIMIZE_TIMEOUT_DEFAULT


def metric_type_map(s: str) -> MetricType:
Expand Down
13 changes: 13 additions & 0 deletions vectordb_bench/backend/clients/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class DB(Enum):
AWSOpenSearch = "OpenSearch"
AliyunElasticsearch = "AliyunElasticsearch"
Test = "test"
AliyunOpenSearch = "AliyunOpenSearch"


@property
Expand Down Expand Up @@ -108,6 +109,10 @@ def init_cls(self) -> Type[VectorDB]:
from .aliyun_elasticsearch.aliyun_elasticsearch import AliyunElasticsearch
return AliyunElasticsearch

if self == DB.AliyunOpenSearch:
from .aliyun_opensearch.aliyun_opensearch import AliyunOpenSearch
return AliyunOpenSearch

@property
def config_cls(self) -> Type[DBConfig]:
"""Import while in use"""
Expand Down Expand Up @@ -175,6 +180,10 @@ def config_cls(self) -> Type[DBConfig]:
from .aliyun_elasticsearch.config import AliyunElasticsearchConfig
return AliyunElasticsearchConfig

if self == DB.AliyunOpenSearch:
from .aliyun_opensearch.config import AliyunOpenSearchConfig
return AliyunOpenSearchConfig

def case_config_cls(self, index_type: IndexType | None = None) -> Type[DBCaseConfig]:
if self == DB.Milvus:
from .milvus.config import _milvus_case_config
Expand Down Expand Up @@ -224,6 +233,10 @@ def case_config_cls(self, index_type: IndexType | None = None) -> Type[DBCaseCon
from .elastic_cloud.config import ElasticCloudIndexConfig
return ElasticCloudIndexConfig

if self == DB.AliyunOpenSearch:
from .aliyun_opensearch.config import AliyunOpenSearchIndexConfig
return AliyunOpenSearchIndexConfig

# DB.Pinecone, DB.Chroma, DB.Redis
return EmptyDBCaseConfig

Expand Down
Loading

0 comments on commit 57dd82c

Please sign in to comment.