[tune] replace self.config (#6313)

This commit is contained in:
Yuhao Yang 2019-11-30 03:09:30 +08:00 committed by Richard Liaw
parent 724a5e3909
commit ffa043d4b7
2 changed files with 3 additions and 1 deletions

View file

@ -81,6 +81,7 @@ class PBTBenchmarkExample(Trainable):
def reset_config(self, new_config):
self.lr = new_config["lr"]
self.config = new_config
return True

View file

@ -396,7 +396,8 @@ class Trainable(object):
This method is optional, but can be implemented to speed up algorithms
such as PBT, and to allow performance optimizations such as running
experiments with reuse_actors=True.
experiments with reuse_actors=True. Note that self.config need to
be updated to reflect the latest parameter information in Ray logs.
Args:
new_config (dir): Updated hyperparameter configuration