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

refactor!: Qdrant - set scale_score default value to False #862

Merged
merged 3 commits into from
Jul 2, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(
document_store: QdrantDocumentStore,
filters: Optional[Union[Dict[str, Any], models.Filter]] = None,
top_k: int = 10,
scale_score: bool = True,
scale_score: bool = False,
return_embedding: bool = False,
):
"""
Expand Down Expand Up @@ -159,7 +159,7 @@ def __init__(
document_store: QdrantDocumentStore,
filters: Optional[Union[Dict[str, Any], models.Filter]] = None,
top_k: int = 10,
scale_score: bool = True,
scale_score: bool = False,
return_embedding: bool = False,
):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ def _query_by_sparse(
query_sparse_embedding: SparseEmbedding,
filters: Optional[Union[Dict[str, Any], rest.Filter]] = None,
top_k: int = 10,
scale_score: bool = True,
scale_score: bool = False,
Copy link
Member Author

@anakin87 anakin87 Jul 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the changes in this file are not needed, since Retrievers are the only interfaces for these methods,
but I think they make the overall behavior clearer.

return_embedding: bool = False,
) -> List[Document]:
"""
Expand Down Expand Up @@ -553,7 +553,7 @@ def _query_by_embedding(
query_embedding: List[float],
filters: Optional[Union[Dict[str, Any], rest.Filter]] = None,
top_k: int = 10,
scale_score: bool = True,
scale_score: bool = False,
return_embedding: bool = False,
) -> List[Document]:
"""
Expand Down
4 changes: 2 additions & 2 deletions integrations/qdrant/tests/test_retriever.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def test_to_dict(self):
},
"filters": None,
"top_k": 10,
"scale_score": True,
"scale_score": False,
"return_embedding": False,
},
}
Expand Down Expand Up @@ -190,7 +190,7 @@ def test_to_dict(self):
},
"filters": None,
"top_k": 10,
"scale_score": True,
"scale_score": False,
"return_embedding": False,
},
}
Expand Down