Skip to content

Commit

Permalink
fix: remove fastembed deprecation from qdrant client (#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
joein authored Mar 5, 2024
1 parent 9323c0a commit 28881be
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 31 deletions.
12 changes: 0 additions & 12 deletions qdrant_client/async_qdrant_fastembed.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
if TextEmbedding
else {}
)
_DEPRECATED_MODELS = {"BAAI/bge-base-en", "BAAI/bge-small-en"}


class AsyncQdrantFastembedMixin(AsyncQdrantBase):
Expand All @@ -53,11 +52,6 @@ def __init__(self, **kwargs: Any):
def embedding_model_name(self) -> str:
if self._embedding_model_name is None:
self._embedding_model_name = self.DEFAULT_EMBEDDING_MODEL
warnings.warn(
f"Usage of the default model <{self.DEFAULT_EMBEDDING_MODEL}> is deprecated. Default model will be set to <BAAI/bge-small-en-v1.5> in `qdrant-client==1.9.0`Please specify the model explicitly with `set_model` method.",
DeprecationWarning,
stacklevel=2,
)
return self._embedding_model_name

def set_model(
Expand All @@ -84,12 +78,6 @@ def set_model(
Returns:
None
"""
if embedding_model_name in _DEPRECATED_MODELS:
warnings.warn(
f"Usage of {embedding_model_name} is deprecated. It will be removed in `qdrant-client==1.9.0`",
DeprecationWarning,
stacklevel=2,
)
if max_length is not None:
warnings.warn(
"max_length parameter is deprecated and will be removed in the future. It's not used by fastembed models.",
Expand Down
19 changes: 0 additions & 19 deletions qdrant_client/qdrant_fastembed.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@
else {}
)

_DEPRECATED_MODELS = {
"BAAI/bge-base-en",
"BAAI/bge-small-en",
}


class QdrantFastembedMixin(QdrantBase):
DEFAULT_EMBEDDING_MODEL = "BAAI/bge-small-en"
Expand All @@ -51,13 +46,6 @@ def __init__(self, **kwargs: Any):
def embedding_model_name(self) -> str:
if self._embedding_model_name is None:
self._embedding_model_name = self.DEFAULT_EMBEDDING_MODEL
warnings.warn(
f"Usage of the default model <{self.DEFAULT_EMBEDDING_MODEL}> is deprecated. "
f"Default model will be set to <BAAI/bge-small-en-v1.5> in `qdrant-client==1.9.0`"
"Please specify the model explicitly with `set_model` method.",
DeprecationWarning,
stacklevel=2,
)
return self._embedding_model_name

def set_model(
Expand Down Expand Up @@ -85,13 +73,6 @@ def set_model(
None
"""

if embedding_model_name in _DEPRECATED_MODELS:
warnings.warn(
f"Usage of {embedding_model_name} is deprecated. It will be removed in `qdrant-client==1.9.0`",
DeprecationWarning,
stacklevel=2,
)

if max_length is not None:
warnings.warn(
"max_length parameter is deprecated and will be removed in the future. "
Expand Down

0 comments on commit 28881be

Please sign in to comment.