Skip to content
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

Added AlloyDB client #412

Merged
merged 3 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ All the database client supported
| pgvector | `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]` |
| 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]` |

### Run

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ 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" ]
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 @@ -32,6 +32,7 @@ class DB(Enum):
PgVectoRS = "PgVectoRS"
PgVectorScale = "PgVectorScale"
PgDiskANN = "PgDiskANN"
AlloyDB = "AlloyDB"
Redis = "Redis"
MemoryDB = "MemoryDB"
Chroma = "Chroma"
Expand Down Expand Up @@ -97,6 +98,10 @@ def init_cls(self) -> Type[VectorDB]:
if self == DB.AWSOpenSearch:
from .aws_opensearch.aws_opensearch import AWSOpenSearch
return AWSOpenSearch

if self == DB.AlloyDB:
from .alloydb.alloydb import AlloyDB
return AlloyDB

@property
def config_cls(self) -> Type[DBConfig]:
Expand Down Expand Up @@ -156,6 +161,10 @@ def config_cls(self) -> Type[DBConfig]:
if self == DB.AWSOpenSearch:
from .aws_opensearch.config import AWSOpenSearchConfig
return AWSOpenSearchConfig

if self == DB.AlloyDB:
from .alloydb.config import AlloyDBConfig
return AlloyDBConfig

def case_config_cls(self, index_type: IndexType | None = None) -> Type[DBCaseConfig]:
if self == DB.Milvus:
Expand Down Expand Up @@ -197,6 +206,10 @@ def case_config_cls(self, index_type: IndexType | None = None) -> Type[DBCaseCon
if self == DB.PgDiskANN:
from .pgdiskann.config import _pgdiskann_case_config
return _pgdiskann_case_config.get(index_type)

if self == DB.AlloyDB:
from .alloydb.config import _alloydb_case_config
return _alloydb_case_config.get(index_type)

# DB.Pinecone, DB.Chroma, DB.Redis
return EmptyDBCaseConfig
Expand Down
Loading