Skip to content

Commit

Permalink
Set KnnDescriptor.desc_name in the Benchmarking core framework in FAI…
Browse files Browse the repository at this point in the history
…SS like other descriptors (#4109)

Summary:
Pull Request resolved: #4109

Set KnnDescriptor.desc_name in the Benchmarking core framework in FAISS like other descriptors

Reviewed By: mnorris11

Differential Revision: D67539874

fbshipit-source-id: 09ffb76296f466ae2d3b0eb551917f429bc7300f
  • Loading branch information
satymish authored and facebook-github-bot committed Dec 23, 2024
1 parent ab8cb9c commit 3c8dc41
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions benchs/bench_fw/descriptors.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,8 @@ def __hash__(self):
return hash(str(self))

def get_name(self):
if self.desc_name is not None:
return self.desc_name
name = self.index_desc.get_name()
name += IndexBaseDescriptor.param_dict_to_name(self.search_params)
name += self.query_dataset.get_filename(KnnDescriptor.FILENAME_PREFIX)
Expand All @@ -350,6 +352,7 @@ def get_name(self):
name += "rec."
else:
name += "knn."
self.desc_name = name
return name

def flat_name(self):
Expand Down

0 comments on commit 3c8dc41

Please sign in to comment.