[tune] lazy trials (#10802)

* Lazily fill trial queue

* Update interface

* Update end to end reporter test

* Removed `next_trials()` method

* Lint

* Print total number of samples to be generated in progress reporter. Allow infinite samples.

* Nit check
This commit is contained in:
Kai Fricke
2020-09-17 08:51:46 -07:00
committed by GitHub
parent 89da3f9ba7
commit ee99c919e3
15 changed files with 163 additions and 91 deletions
+4 -1
View File
@@ -211,7 +211,10 @@ def RunnerHandler(runner):
resource["trials"] = []
trial_generator = BasicVariantGenerator()
trial_generator.add_configurations({name: spec})
for trial in trial_generator.next_trials():
while not trial_generator.is_finished():
trial = trial_generator.next_trial()
if not trial:
break
runner.add_trial(trial)
resource["trials"].append(self._trial_info(trial))
return resource