Skip to content

Commit

Permalink
Use stable sorting in prune_inferior_points
Browse files Browse the repository at this point in the history
  • Loading branch information
Balandat committed Sep 21, 2024
1 parent 8cfaee7 commit 7312cf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion botorch/acquisition/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def prune_inferior_points(
idcs, counts = torch.unique(is_best, return_counts=True)

if len(idcs) > max_points:
counts, order_idcs = torch.sort(counts, descending=True)
counts, order_idcs = torch.sort(counts, stable=True, descending=True)
idcs = order_idcs[:max_points]

return X[idcs]
Expand Down

0 comments on commit 7312cf6

Please sign in to comment.