Conversation
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev/1.37 #1997 +/- ##
===========================================
Coverage ? 86.62%
===========================================
Files ? 298
Lines ? 22907
Branches ? 0
===========================================
Hits ? 19843
Misses ? 3064
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Great to see you again! Thanks for the contribution. |
# Conflicts: # weaviate/proto/v1/v4216/v1/base_search_pb2.py # weaviate/proto/v1/v4216/v1/base_search_pb2.pyi # weaviate/proto/v1/v5261/v1/base_search_pb2.py # weaviate/proto/v1/v5261/v1/base_search_pb2.pyi # weaviate/proto/v1/v6300/v1/base_search_pb2.py # weaviate/proto/v1/v6300/v1/base_search_pb2.pyi
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Secrets | View in Orca |
| Rerank, | ||
| TargetVectorJoinType, | ||
| MMR, | ||
| ) |
There was a problem hiding this comment.
You also need to add this to .generate
| filters: Optional[FilterReturn] = None, | ||
| group_by: Literal[None] = None, | ||
| rerank: Optional[Rerank] = None, | ||
| selection: Optional[MMR] = None, |
There was a problem hiding this comment.
selection is kind of generic. Maybe diversity_section? I am not 100% sure what it does
| include_vector: Whether to include the vector in the results. If not specified, this is set to False. | ||
| return_metadata: The metadata to return for each object, defaults to `None`. | ||
| return_properties: The properties to return for each object. | ||
| return_references: The references to return for each object. |
There was a problem hiding this comment.
docstring needs to be updated everywhere
| @@ -9,6 +9,7 @@ from weaviate.collections.classes.grpc import ( | |||
| NearVectorInputType, | |||
There was a problem hiding this comment.
Hybrid also needs support for this
| balance: Optional[float] = None | ||
|
|
||
|
|
||
| class Diversity: |
There was a problem hiding this comment.
this should match the parameter name
| def __init__(self) -> None: | ||
| raise TypeError("Diversity cannot be instantiated directly. Use Diversity.MMR(...).") | ||
|
|
||
| MMR = MMR |
There was a problem hiding this comment.
I would add a factory here, eg something like
@staticmethod
def mmr(limit: Optional[int] = None, balance: Optional[float] = None) -> MMR:
"""Maximal Marginal Relevance.
Args:
limit: number of candidates to consider for diversification.
balance: MMR lambda in [0.0, 1.0] — 1.0 pure relevance, 0.0 pure diversity.
"""
return MMR(limit=limit, balance=balance)
No description provided.