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):
classHyperband(MsgDispatcherBase):
"""Hyperband inherit from MsgDispatcherBase rather than Tuner, because it integrates both tuner's functions and assessor's functions.
"""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.
This is an implementation that could fully leverage available resources, i.e., high parallelism.
...
@@ -320,7 +305,7 @@ class Hyperband(MsgDispatcherBase):
...
@@ -320,7 +305,7 @@ class Hyperband(MsgDispatcherBase):
defload_checkpoint(self):
defload_checkpoint(self):
pass
pass
defsave_checkpont(self):
defsave_checkpoint(self):
pass
pass
defhandle_initialize(self,data):
defhandle_initialize(self,data):
...
@@ -333,7 +318,6 @@ class Hyperband(MsgDispatcherBase):
...
@@ -333,7 +318,6 @@ class Hyperband(MsgDispatcherBase):
"""
"""
self.handle_update_search_space(data)
self.handle_update_search_space(data)
send(CommandType.Initialized,'')
send(CommandType.Initialized,'')
returnTrue
defhandle_request_trial_jobs(self,data):
defhandle_request_trial_jobs(self,data):
"""
"""
...
@@ -345,21 +329,11 @@ class Hyperband(MsgDispatcherBase):
...
@@ -345,21 +329,11 @@ class Hyperband(MsgDispatcherBase):
for_inrange(data):
for_inrange(data):
self._request_one_trial_job()
self._request_one_trial_job()
returnTrue
def_request_one_trial_job(self):
def_request_one_trial_job(self):
"""get one trial job, i.e., one hyperparameter configuration."""
"""get one trial job, i.e., one hyperparameter configuration."""