We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2617cb4 commit 03b742bCopy full SHA for 03b742b
engine/base_client/search.py
@@ -2,6 +2,7 @@
2
import time
3
from multiprocessing import get_context
4
from typing import Iterable, List, Optional, Tuple
5
+import itertools
6
7
import numpy as np
8
import tqdm
@@ -72,9 +73,11 @@ def search_all(
72
73
74
search_one = functools.partial(self.__class__._search_one, top=top)
75
used_queries = queries
76
+
77
78
if MAX_QUERIES > 0:
- used_queries = queries[0:MAX_QUERIES-1]
- print(f"limitting queries to [0:{MAX_QUERIES}]")
79
+ used_queries = itertools.islice(queries, MAX_QUERIES)
80
+ print(f"Limiting queries to [0:{MAX_QUERIES-1}]")
81
82
if parallel == 1:
83
start = time.perf_counter()
0 commit comments