mirror of
https://github.com/wassname/ray.git
synced 2026-09-11 12:43:20 +08:00
[tune] Add PyTorch MNIST Example + Misc. Tweaks (#2708)
This commit is contained in:
@@ -16,7 +16,7 @@ from ray.tune.logger import pretty_print, UnifiedLogger
|
||||
# have been defined yet. See https://github.com/ray-project/ray/issues/1716.
|
||||
import ray.tune.registry
|
||||
from ray.tune.result import (DEFAULT_RESULTS_DIR, DONE, HOSTNAME, PID,
|
||||
TIME_TOTAL_S, TRAINING_ITERATION)
|
||||
TIME_TOTAL_S, TRAINING_ITERATION, TIMESTEPS_TOTAL)
|
||||
from ray.utils import random_string, binary_to_hex
|
||||
|
||||
DEBUG_PRINT_INTERVAL = 5
|
||||
@@ -237,8 +237,12 @@ class Trial(object):
|
||||
int(self.last_result.get(TIME_TOTAL_S)))
|
||||
]
|
||||
|
||||
if self.last_result.get("timesteps_total") is not None:
|
||||
pieces.append('{} ts'.format(self.last_result["timesteps_total"]))
|
||||
if self.last_result.get(TRAINING_ITERATION) is not None:
|
||||
pieces.append('{} iter'.format(
|
||||
self.last_result[TRAINING_ITERATION]))
|
||||
|
||||
if self.last_result.get(TIMESTEPS_TOTAL) is not None:
|
||||
pieces.append('{} ts'.format(self.last_result[TIMESTEPS_TOTAL]))
|
||||
|
||||
if self.last_result.get("episode_reward_mean") is not None:
|
||||
pieces.append('{} rew'.format(
|
||||
|
||||
Reference in New Issue
Block a user