Skip to content

Commit

Permalink
Add constraints to hnswlib in raft-bench-ann (#1949)
Browse files Browse the repository at this point in the history
This PR adds a constraint for `hnswlib` search params such that `ef >= k`

Authors:
  - Divye Gala (https://github.com/divyegala)

Approvers:
  - Corey J. Nolet (https://github.com/cjnolet)

URL: #1949
  • Loading branch information
divyegala authored Nov 1, 2023
1 parent 67a796c commit bae13e5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,8 @@ def raft_ivf_pq_search_constraints(params, build_params, k, batch_size):
def raft_cagra_search_constraints(params, build_params, k, batch_size):
if "itopk" in params:
return params["itopk"] >= k


def hnswlib_search_constraints(params, build_params, k, batch_size):
if "ef" in params:
return params["ef"] >= k
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: hnswlib
constraints:
search: raft-ann-bench.constraints.hnswlib_search_constraints
groups:
base:
build:
M: [12, 16, 24, 36]
efConstruction: [64, 128, 256, 512]
search:
ef: [10, 20, 40, 60, 80, 120, 200, 400, 600, 800]
ef: [10, 20, 40, 60, 80, 120, 200, 400, 600, 800]

0 comments on commit bae13e5

Please sign in to comment.