[tune] IP Check, Flatten Results for TBX (#7705)

* support_flattened

* loggers

* Format logger changes

Co-authored-by: Kristian Hartikainen <kristian.hartikainen@gmail.com>
This commit is contained in:
Richard Liaw
2020-03-25 09:18:03 +00:00
committed by GitHub
co-authored by Kristian Hartikainen
parent e95455b7d7
commit 82b792be33
3 changed files with 14 additions and 12 deletions
+4 -4
View File
@@ -178,7 +178,7 @@ class Trainable:
"slow to initialize, consider setting "
"reuse_actors=True to reduce actor creation "
"overheads.".format(setup_time))
self._local_ip = ray.services.get_node_ip_address()
self._local_ip = self.get_current_ip()
log_sys_usage = self.config.get("log_sys_usage", False)
self._monitor = UtilMonitor(start=log_sys_usage)
@@ -213,7 +213,7 @@ class Trainable:
"""
return ""
def current_ip(self):
def get_current_ip(self):
logger.info("Getting current IP.")
self._local_ip = ray.services.get_node_ip_address()
return self._local_ip
@@ -419,8 +419,8 @@ class Trainable:
self._timesteps_since_restore = 0
self._iterations_since_restore = 0
self._restored = True
logger.info("Restored on %s from checkpoint: %s", self.current_ip(),
checkpoint_path)
logger.info("Restored on %s from checkpoint: %s",
self.get_current_ip(), checkpoint_path)
state = {
"_iteration": self._iteration,
"_timesteps_total": self._timesteps_total,