Skip to content

Commit 75a9c61

Browse files
Modify the string of hnswlib's parameters to add efQuery (#562)
* Modify the string of hnswlib's parameters to add efQuery * Removed commented out code. --------- Co-authored-by: Martin Aumüller <[email protected]>
1 parent 0e32628 commit 75a9c61

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ann_benchmarks/algorithms/hnswlib/module.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ def __init__(self, metric, method_param):
99
self.metric = {"angular": "cosine", "euclidean": "l2"}[metric]
1010
self.method_param = method_param
1111
# print(self.method_param,save_index,query_param)
12-
# self.ef=query_param['ef']
13-
self.name = "hnswlib (%s)" % (self.method_param)
1412

1513
def fit(self, X):
1614
# Only l2 is supported currently
@@ -24,6 +22,7 @@ def fit(self, X):
2422

2523
def set_query_arguments(self, ef):
2624
self.p.set_ef(ef)
25+
self.name = "hnswlib (%s, 'efQuery': %s)" % (self.method_param, ef)
2726

2827
def query(self, v, n):
2928
# print(np.expand_dims(v,axis=0).shape)

0 commit comments

Comments
 (0)