Skip to content
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
1 change: 1 addition & 0 deletions vectordb_bench/backend/clients/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ class VectorDB(ABC):

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

@classmethod
def filter_supported(cls, filters: Filter) -> bool:
Expand Down
3 changes: 1 addition & 2 deletions vectordb_bench/backend/runner/rate_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

from vectordb_bench import config
from vectordb_bench.backend.clients import api
from vectordb_bench.backend.clients.pgvector.pgvector import PgVector
from vectordb_bench.backend.dataset import DataSetIterator
from vectordb_bench.backend.utils import time_it

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

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