Skip to content

Commit

Permalink
adjust metrics comparison (#1798)
Browse files Browse the repository at this point in the history
Signed-off-by: MrPresent-Han <[email protected]>
  • Loading branch information
MrPresent-Han authored Nov 22, 2023
1 parent 642f729 commit 9075512
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pymilvus/orm/iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,9 @@ def close(self) -> None:
def metrics_positive_related(metrics: str) -> bool:
if metrics in [CALC_DIST_L2, CALC_DIST_JACCARD, CALC_DIST_HAMMING, CALC_DIST_TANIMOTO]:
return True
if metrics is CALC_DIST_IP or metrics is CALC_DIST_COSINE:
if metrics in [CALC_DIST_IP, CALC_DIST_COSINE]:
return False
raise MilvusException(message=f"unsupported metrics type for search iteration{metrics}")
raise MilvusException(message=f"unsupported metrics type for search iteration: {metrics}")


class SearchPage(LoopBase):
Expand Down

0 comments on commit 9075512

Please sign in to comment.