From c75f166e2f2d8b9356647588cb1c8731b9f259c7 Mon Sep 17 00:00:00 2001 From: Satyendra Mishra Date: Wed, 23 Apr 2025 06:01:49 -0700 Subject: [PATCH] Add date and time to the codec file path so that the file doesn't get overridden with each run (#4303) Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4303 Add date and time to the codec file path so that the file doesn't get overridden with each run Reviewed By: junjieqi Differential Revision: D73419533 fbshipit-source-id: 289875f07c5037e40921ae3a8bfcb339bee1131c --- benchs/bench_fw/descriptors.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/benchs/bench_fw/descriptors.py b/benchs/bench_fw/descriptors.py index f7c2e9e9a..cf0ee958f 100644 --- a/benchs/bench_fw/descriptors.py +++ b/benchs/bench_fw/descriptors.py @@ -113,6 +113,8 @@ class DatasetDescriptor: # desc_name desc_name: Optional[str] = None + filename_suffix: Optional[str] = None + normalize_L2: bool = False def __hash__(self): @@ -138,6 +140,8 @@ class DatasetDescriptor: ).replace("=", "_").replace("/", "_") if self.num_vectors is not None: filename += f"_{self.num_vectors}" + if self.filename_suffix is not None: + filename += f"_{self.filename_suffix}" filename += "." self.desc_name = filename