[tune] Reset Config for Trainables (#2831)

Adds the ability for trainables to reset their configurations during experiments. These changes in particular add the base functions to the trial_executor and trainable interfaces as well as giving the basic implementation on the PopulationBasedTraining scheduler.

Related issue number: #2741
This commit is contained in:
Kaahan
2018-09-11 08:45:04 -07:00
committed by Richard Liaw
parent 5da6e78db1
commit 045861c9b0
7 changed files with 101 additions and 21 deletions
+12
View File
@@ -273,6 +273,18 @@ class Trainable(object):
self.restore(checkpoint_path)
shutil.rmtree(tmpdir)
def reset_config(self, new_config):
"""Resets configuration without restarting the trial.
Args:
new_config (dir): Updated hyperparameter configuration
for the trainable.
Returns:
True if configuration reset successfully else False.
"""
return False
def stop(self):
"""Releases all resources used by this trainable."""