@@ -45,8 +45,7 @@ def _read_args(argv: list[str] | None = None) -> argparse.Namespace:
45
45
)
46
46
parser .add_argument (
47
47
"--max_threads_init" ,
48
- help = "Maximum number of threads for the first operation" ,
49
- default = max (len (os .sched_getaffinity (0 )) - 1 , 1 ),
48
+ help = "Maximum number of threads for building the initial graph" ,
50
49
type = int ,
51
50
)
52
51
parser .add_argument (
@@ -157,7 +156,7 @@ def build_dynamic(
157
156
max_candidate_pool_size : int = 750 ,
158
157
alpha : float | None = None ,
159
158
max_threads : int = 1 ,
160
- max_threads_init : int = 1 ,
159
+ max_threads_init : int | None = None ,
161
160
batch_size : int = 10000 ,
162
161
num_vectors_delete : int = 0 ,
163
162
num_vectors_init : int | None = None ,
@@ -202,6 +201,8 @@ def build_dynamic(
202
201
num_vectors_init = batch_size
203
202
else :
204
203
num_vectors_init = int (num_vectors * proportion_vectors_init )
204
+ if max_threads_init is None :
205
+ max_threads_init = max_threads
205
206
if not max_threads_ignore_batch :
206
207
max_threads = min (max_threads , batch_size )
207
208
max_threads_init = min (max_threads_init , num_vectors_init )
0 commit comments