We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ad4320 commit 63942ffCopy full SHA for 63942ff
1 file changed
src/gradient_free_optimizers/search.py
@@ -314,8 +314,14 @@ def _submit_one():
314
if self._check_stop(n_evaluated):
315
break
316
317
- # Refill the freed worker slot
318
- _submit_one()
+ # Refill the freed worker slot. Cache hits consume iterations
+ # without adding futures, so keep trying until a future is
319
+ # queued or there's nothing left to submit.
320
+ while n_evaluated < n_iter:
321
+ if _submit_one() == 0:
322
+ break
323
+ if self._check_stop(n_evaluated):
324
325
326
def _run_batch_async(self, n_iter, nth_trial):
327
"""Batch-async iteration for stateful optimizers.
0 commit comments