mirror of
https://github.com/wassname/ray.git
synced 2026-08-11 11:24:51 +08:00
[tune] Split Search from Scheduling (#2452)
Introduces SearchAlgorithm concept, separate from schedulers in Tune. Moves HyperOpt under this concept.
This commit is contained in:
@@ -80,6 +80,7 @@ class Trial(object):
|
||||
def __init__(self,
|
||||
trainable_name,
|
||||
config=None,
|
||||
trial_id=None,
|
||||
local_dir=DEFAULT_RESULTS_DIR,
|
||||
experiment_tag="",
|
||||
resources=None,
|
||||
@@ -131,10 +132,17 @@ class Trial(object):
|
||||
self.logdir = None
|
||||
self.result_logger = None
|
||||
self.last_debug = 0
|
||||
self.trial_id = binary_to_hex(random_string())[:8]
|
||||
if trial_id is not None:
|
||||
self.trial_id = trial_id
|
||||
else:
|
||||
self.trial_id = Trial.generate_id()
|
||||
self.error_file = None
|
||||
self.num_failures = 0
|
||||
|
||||
@classmethod
|
||||
def generate_id(cls):
|
||||
return binary_to_hex(random_string())[:8]
|
||||
|
||||
def start(self, checkpoint_obj=None):
|
||||
"""Starts this trial.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user