Skip to content

Commit

Permalink
enhance:expose reduce_stop_for_best to users(#2181) (#2188)
Browse files Browse the repository at this point in the history
related: #2181

Signed-off-by: MrPresent-Han <[email protected]>
Co-authored-by: MrPresent-Han <[email protected]>
  • Loading branch information
MrPresent-Han and MrPresent-Han authored Jul 22, 2024
1 parent cc1b448 commit 93be83a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pymilvus/orm/iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ def __set_up_iteration_states(self):
self._kwargs[ITERATOR_FIELD] = "True"

def __check_set_reduce_stop_for_best(self):
self._kwargs[REDUCE_STOP_FOR_BEST] = "True"
if self._kwargs.get(REDUCE_STOP_FOR_BEST, True):
self._kwargs[REDUCE_STOP_FOR_BEST] = "True"
else:
self._kwargs[REDUCE_STOP_FOR_BEST] = "False"

def __check_set_batch_size(self, batch_size: int):
if batch_size < 0:
Expand Down

0 comments on commit 93be83a

Please sign in to comment.