Skip to content

Commit 583f0cf

Browse files
fix: remove psycopg dependency from rate_runner (#606)
Signed-off-by: min.tian <[email protected]>
1 parent 4fd27ef commit 583f0cf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

vectordb_bench/backend/clients/api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ class VectorDB(ABC):
135135

136136
"The filtering types supported by the VectorDB Client, default only non-filter"
137137
supported_filter_types: list[FilterOp] = [FilterOp.NonFilter]
138+
name: str = ""
138139

139140
@classmethod
140141
def filter_supported(cls, filters: Filter) -> bool:

vectordb_bench/backend/runner/rate_runner.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
from vectordb_bench import config
99
from vectordb_bench.backend.clients import api
10-
from vectordb_bench.backend.clients.pgvector.pgvector import PgVector
1110
from vectordb_bench.backend.dataset import DataSetIterator
1211
from vectordb_bench.backend.utils import time_it
1312

@@ -48,7 +47,7 @@ def _insert_embeddings(db: api.VectorDB, emb: list[list[float]], metadata: list[
4847
msg = f"Insert failed and retried more than {config.MAX_INSERT_RETRY} times"
4948
raise RuntimeError(msg) from None
5049

51-
if isinstance(db, PgVector):
50+
if db.name == "PgVector":
5251
# pgvector is not thread-safe for concurrent insert,
5352
# so we need to copy the db object, make sure each thread has its own connection
5453
db_copy = deepcopy(db)

0 commit comments

Comments
 (0)