mirror of
https://github.com/wassname/ray.git
synced 2026-07-12 06:02:37 +08:00
[tune] Sync logs from workers and improve tensorboard reporting (#1567)
This commit is contained in:
@@ -13,6 +13,7 @@ import tempfile
|
||||
import time
|
||||
import uuid
|
||||
|
||||
import ray
|
||||
from ray.tune import TuneError
|
||||
from ray.tune.logger import UnifiedLogger
|
||||
from ray.tune.result import DEFAULT_RESULTS_DIR
|
||||
@@ -87,6 +88,7 @@ class Trainable(object):
|
||||
self._timesteps_total = 0
|
||||
self._setup()
|
||||
self._initialize_ok = True
|
||||
self._local_ip = ray.services.get_node_ip_address()
|
||||
|
||||
def train(self):
|
||||
"""Runs one logical iteration of training.
|
||||
@@ -136,6 +138,7 @@ class Trainable(object):
|
||||
neg_mean_loss=neg_loss,
|
||||
pid=os.getpid(),
|
||||
hostname=os.uname()[1],
|
||||
node_ip=self._local_ip,
|
||||
config=self.config)
|
||||
|
||||
self._result_logger.on_result(result)
|
||||
|
||||
Reference in New Issue
Block a user