Skip to content
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

fix: remove fastembed deprecation from qdrant client #524

Merged
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
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
Loading