diff --git a/experiments/run-big-bench.py b/experiments/run-big-bench.py index 58aea39..62da973 100644 --- a/experiments/run-big-bench.py +++ b/experiments/run-big-bench.py @@ -137,15 +137,14 @@ def compute_metrics( """ is_flatnav_index = type(index) in (flatnav.index.L2Index, flatnav.index.IPIndex) + index.set_num_threads(1) if is_flatnav_index: - index.set_num_threads(1) start = time.time() _, top_k_indices = index.search( queries=queries, ef_search=ef_search, K=k, num_initializations=300 ) end = time.time() else: - index.set_num_threads(1) index.set_ef(ef_search) start = time.time() # Search for HNSW return (ids, distances) instead of (distances, ids)