Skip to content

Commit

Permalink
Modify the string of hnswlib's parameters to add efQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
guangzegu authored Dec 25, 2024
1 parent 0e32628 commit 5599792
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ann_benchmarks/algorithms/hnswlib/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def __init__(self, metric, method_param):
self.method_param = method_param
# print(self.method_param,save_index,query_param)
# self.ef=query_param['ef']
self.name = "hnswlib (%s)" % (self.method_param)
# self.name = "hnswlib (%s)" % (self.method_param)

def fit(self, X):
# Only l2 is supported currently
Expand All @@ -24,6 +24,7 @@ def fit(self, X):

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

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

0 comments on commit 5599792

Please sign in to comment.