mirror of
https://github.com/wassname/ray.git
synced 2026-07-19 11:27:32 +08:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user