Skip to content

Fix arg name #248

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

Merged
merged 2 commits into from
May 12, 2025
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
4 changes: 2 additions & 2 deletions .github/workflows/continuous-benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
uses: ./.github/workflows/actions/send-slack-msg
if: failure() || cancelled()
with:
source_name: "runTenantsBenchmark"
bench_name: "runTenantsBenchmark"
job_status: ${{ job.status }}
failed_outputs: ${{ steps.benches.outputs.failed }}
qdrant_version: ${{ steps.benches.outputs.qdrant_version }}
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
uses: ./.github/workflows/actions/send-slack-msg
if: failure() || cancelled()
with:
source_name: "runParallelBenchmark"
bench_name: "runParallelBenchmark"
job_status: ${{ job.status }}
failed_outputs: ${{ steps.benches.outputs.failed }}
qdrant_version: ${{ steps.benches.outputs.qdrant_version }}
Expand Down
6 changes: 4 additions & 2 deletions engine/clients/qdrant/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from benchmark.dataset import Dataset
from engine.base_client.configure import BaseConfigurator
from engine.base_client.distances import Distance
from engine.clients.qdrant.config import QDRANT_COLLECTION_NAME, QDRANT_API_KEY
from engine.clients.qdrant.config import QDRANT_API_KEY, QDRANT_COLLECTION_NAME


class QdrantConfigurator(BaseConfigurator):
Expand Down Expand Up @@ -32,7 +32,9 @@ class QdrantConfigurator(BaseConfigurator):
def __init__(self, host, collection_params: dict, connection_params: dict):
super().__init__(host, collection_params, connection_params)

self.client = QdrantClient(url=host, api_key=QDRANT_API_KEY, **connection_params)
self.client = QdrantClient(
url=host, api_key=QDRANT_API_KEY, **connection_params
)

def clean(self):
self.client.delete_collection(collection_name=QDRANT_COLLECTION_NAME)
Expand Down
10 changes: 5 additions & 5 deletions engine/clients/qdrant/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
from typing import List, Tuple

import httpx
from qdrant_client import QdrantClient
from qdrant_client import QdrantClient, models
from qdrant_client._pydantic_compat import construct
from qdrant_client import models

from dataset_reader.base_reader import Query
from engine.base_client.search import BaseSearcher
from engine.clients.qdrant.config import QDRANT_COLLECTION_NAME, QDRANT_API_KEY
from engine.clients.qdrant.config import QDRANT_API_KEY, QDRANT_COLLECTION_NAME
from engine.clients.qdrant.parser import QdrantConditionParser


Expand Down Expand Up @@ -48,7 +47,6 @@ def search_one(cls, query: Query, top: int) -> List[Tuple[int, float]]:
values=query.sparse_vector.values,
)


prefetch = cls.search_params.get("prefetch")

if prefetch:
Expand All @@ -65,7 +63,9 @@ def search_one(cls, query: Query, top: int) -> List[Tuple[int, float]]:
query=query_vector,
query_filter=cls.parser.parse(query.meta_conditions),
limit=top,
search_params=models.SearchParams(**cls.search_params.get("config", {})),
search_params=models.SearchParams(
**cls.search_params.get("config", {})
),
with_payload=cls.search_params.get("with_payload", False),
)
except Exception as ex:
Expand Down
6 changes: 4 additions & 2 deletions engine/clients/qdrant/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

from dataset_reader.base_reader import Record
from engine.base_client.upload import BaseUploader
from engine.clients.qdrant.config import QDRANT_COLLECTION_NAME, QDRANT_API_KEY
from engine.clients.qdrant.config import QDRANT_API_KEY, QDRANT_COLLECTION_NAME


class QdrantUploader(BaseUploader):
Expand All @@ -24,7 +24,9 @@ class QdrantUploader(BaseUploader):
def init_client(cls, host, distance, connection_params, upload_params):
os.environ["GRPC_ENABLE_FORK_SUPPORT"] = "true"
os.environ["GRPC_POLL_STRATEGY"] = "epoll,poll"
cls.client = QdrantClient(url=host, prefer_grpc=True, api_key=QDRANT_API_KEY, **connection_params)
cls.client = QdrantClient(
url=host, prefer_grpc=True, api_key=QDRANT_API_KEY, **connection_params
)
cls.upload_params = upload_params

@classmethod
Expand Down