diff --git a/python/raft-ann-bench/src/raft-ann-bench/constraints/__init__.py b/python/raft-ann-bench/src/raft-ann-bench/constraints/__init__.py index b61d185356..e7498282aa 100644 --- a/python/raft-ann-bench/src/raft-ann-bench/constraints/__init__.py +++ b/python/raft-ann-bench/src/raft-ann-bench/constraints/__init__.py @@ -38,3 +38,7 @@ 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 diff --git a/python/raft-ann-bench/src/raft-ann-bench/run/conf/algos/hnswlib.yaml b/python/raft-ann-bench/src/raft-ann-bench/run/conf/algos/hnswlib.yaml index 021ca96bcd..9268c4cb08 100644 --- a/python/raft-ann-bench/src/raft-ann-bench/run/conf/algos/hnswlib.yaml +++ b/python/raft-ann-bench/src/raft-ann-bench/run/conf/algos/hnswlib.yaml @@ -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] \ No newline at end of file + ef: [10, 20, 40, 60, 80, 120, 200, 400, 600, 800]