Skip to content

Commit

Permalink
Manuall add this optimizers_config to address issue iusztinpaul#72
Browse files Browse the repository at this point in the history
  • Loading branch information
dvquy13 committed Apr 7, 2024
1 parent 0caefa2 commit 1fba5f5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/streaming_pipeline/streaming_pipeline/qdrant.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 1fba5f5

Please sign in to comment.