(self)
| 349 | return self |
| 350 | |
| 351 | def __next__(self): |
| 352 | self.run(1, block_until_done=self.asynchronous) |
| 353 | if self.early_stop_fn is not None: |
| 354 | stop, kwargs = self.early_stop_fn(self.trials, *self.early_stop_args) |
| 355 | self.early_stop_args = kwargs |
| 356 | if stop: |
| 357 | raise StopIteration() |
| 358 | if len(self.trials) >= self.max_evals: |
| 359 | raise StopIteration() |
| 360 | return self.trials |
| 361 | |
| 362 | def exhaust(self): |
| 363 | n_done = len(self.trials) |