raiseRuntimeError('Incorrect final result: the final result for %s should be float/int, or a dict which has a key named "default" whose value is float/int.'%str(self.__class__))
returnreward
classHyperband(MsgDispatcherBase):
"""Hyperband inherit from MsgDispatcherBase rather than Tuner, because it integrates both tuner's functions and assessor's functions.
This is an implementation that could fully leverage available resources, i.e., high parallelism.
...
...
@@ -320,7 +305,7 @@ class Hyperband(MsgDispatcherBase):
defload_checkpoint(self):
pass
defsave_checkpont(self):
defsave_checkpoint(self):
pass
defhandle_initialize(self,data):
...
...
@@ -333,7 +318,6 @@ class Hyperband(MsgDispatcherBase):
"""
self.handle_update_search_space(data)
send(CommandType.Initialized,'')
returnTrue
defhandle_request_trial_jobs(self,data):
"""
...
...
@@ -345,21 +329,11 @@ class Hyperband(MsgDispatcherBase):
for_inrange(data):
self._request_one_trial_job()
returnTrue
def_request_one_trial_job(self):
"""get one trial job, i.e., one hyperparameter configuration."""