Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions engine/base_client/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def search_all(
):
parallel = self.search_params.get("parallel", 1)
top = self.search_params.get("top", None)
queries = [q for q in queries] # Preload query vectors into memory

# setup_search may require initialized client
self.init_client(
Expand Down Expand Up @@ -87,8 +88,7 @@ def search_all(
self.search_params,
),
) as pool:
if parallel > 10:
time.sleep(15) # Wait for all processes to start
time.sleep(15) # Wait for all processes to start
start = time.perf_counter()
precisions, latencies = list(
zip(*pool.imap_unordered(search_one, iterable=tqdm.tqdm(queries)))
Expand Down
Loading