From 1fba5f5f512fa77a10a0831bb7b4b2f1daa637b3 Mon Sep 17 00:00:00 2001 From: Quy Dinh Date: Sun, 7 Apr 2024 11:00:31 +0700 Subject: [PATCH] Manuall add this optimizers_config to address issue #72 --- modules/streaming_pipeline/streaming_pipeline/qdrant.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/streaming_pipeline/streaming_pipeline/qdrant.py b/modules/streaming_pipeline/streaming_pipeline/qdrant.py index fc2d4f3..210242c 100644 --- a/modules/streaming_pipeline/streaming_pipeline/qdrant.py +++ b/modules/streaming_pipeline/streaming_pipeline/qdrant.py @@ -4,7 +4,7 @@ from bytewax.outputs import DynamicOutput, StatelessSink from qdrant_client import QdrantClient from qdrant_client.http.api_client import UnexpectedResponse -from qdrant_client.http.models import Distance, VectorParams +from qdrant_client.http.models import Distance, VectorParams, OptimizersConfigDiff from qdrant_client.models import PointStruct from streaming_pipeline import constants @@ -46,6 +46,11 @@ def __init__( vectors_config=VectorParams( size=self._vector_size, distance=Distance.COSINE ), + # Manuall add this optimizers_config to address issue: https://github.com/iusztinpaul/hands-on-llms/issues/72 + # qdrant_client.http.exceptions.ResponseHandlingException: 1 validation error for ParsingModel[InlineResponse2005] (for parse_as_type) + # obj -> result -> config -> optimizer_config -> max_optimization_threads + # none is not an allowed value (type=type_error.none.not_allowed) + optimizers_config=OptimizersConfigDiff(max_optimization_threads=1), ) def build(self, worker_index, worker_count):