Skip to content

Commit 7df3b37

Browse files
committed
Cleanup
1 parent 1c9632e commit 7df3b37

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

pinecone/grpc/query_results_aggregator.py

+2-9
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,8 @@ def __repr__(self):
8181
)
8282

8383

84-
class QueryResultsAggregationEmptyResultsError(Exception):
85-
def __init__(self, namespace: str):
86-
super().__init__(
87-
f"Query results for namespace '{namespace}' were empty. Check that you have upserted vectors into this namespace (see describe_index_stats) and that the namespace name is spelled correctly."
88-
)
89-
90-
9184
class QueryResultsAggregregatorNotEnoughResultsError(Exception):
92-
def __init__(self, num_results: int):
85+
def __init__(self):
9386
super().__init__(
9487
"Cannot interpret results without at least two matches. In order to aggregate results from multiple queries, top_k must be greater than 1 in order to correctly infer the similarity metric from scores."
9588
)
@@ -164,7 +157,7 @@ def add_results(self, results: Dict[str, Any]):
164157
# This condition should match the second time we add results containing
165158
# only one match. We need at least two matches in a single response in order
166159
# to infer the similarity metric
167-
raise QueryResultsAggregregatorNotEnoughResultsError(len(matches))
160+
raise QueryResultsAggregregatorNotEnoughResultsError()
168161
self.is_dotproduct = self._is_dotproduct_index(matches)
169162

170163
if self.is_dotproduct:

0 commit comments

Comments
 (0)