mirror of
https://github.com/wassname/ray.git
synced 2026-09-11 12:43:20 +08:00
[rllib] on_train_result results do not get logged (#3865)
This commit is contained in:
@@ -202,7 +202,7 @@ class Trainable(object):
|
||||
timesteps_since_restore=self._timesteps_since_restore,
|
||||
iterations_since_restore=self._iterations_since_restore)
|
||||
|
||||
self._result_logger.on_result(result)
|
||||
self._log_result(result)
|
||||
|
||||
return result
|
||||
|
||||
@@ -415,6 +415,15 @@ class Trainable(object):
|
||||
"""
|
||||
pass
|
||||
|
||||
def _log_result(self, result):
|
||||
"""Subclasses can optionally override this to customize logging.
|
||||
|
||||
Args:
|
||||
result (dict): Training result returned by _train().
|
||||
"""
|
||||
|
||||
self._result_logger.on_result(result)
|
||||
|
||||
def _stop(self):
|
||||
"""Subclasses should override this for any cleanup on stop."""
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user