[tune] Tweaks to Trainable and Verbosity (#2889)

This commit is contained in:
Richard Liaw
2018-10-11 23:42:13 -07:00
committed by GitHub
parent 828fe24b39
commit f9b58d7b02
17 changed files with 160 additions and 47 deletions
+3 -3
View File
@@ -234,10 +234,10 @@ class Agent(Trainable):
return Trainable.train(self)
def _setup(self):
def _setup(self, config):
env = self._env_id
if env:
self.config["env"] = env
config["env"] = env
if _global_registry.contains(ENV_CREATOR, env):
self.env_creator = _global_registry.get(ENV_CREATOR, env)
else:
@@ -248,7 +248,7 @@ class Agent(Trainable):
# Merge the supplied config with the class default
merged_config = self._default_config.copy()
merged_config = deep_update(merged_config, self.config,
merged_config = deep_update(merged_config, config,
self._allow_unknown_configs,
self._allow_unknown_subkeys)
self.config = merged_config