[rllib] Misc fixes, A2C (#2679)

A bunch of minor rllib fixes:

pull in latest baselines atari wrapper changes (and use deepmind wrapper by default)
move reward clipping to policy evaluator
add a2c variant of a3c
reduce vision network fc layer size to 256 units
switch to 84x84 images
doc tweaks
print timesteps in tune status
This commit is contained in:
Eric Liang
2018-08-20 15:28:03 -07:00
committed by GitHub
parent 880ef1bd21
commit fbe6c59f72
34 changed files with 220 additions and 129 deletions
+5 -4
View File
@@ -9,7 +9,8 @@ import os
import yaml
from ray.tune.log_sync import get_syncer
from ray.tune.result import NODE_IP, TRAINING_ITERATION, TIME_TOTAL_S
from ray.tune.result import NODE_IP, TRAINING_ITERATION, TIME_TOTAL_S, \
TIMESTEPS_TOTAL
try:
import tensorflow as tf
@@ -132,13 +133,13 @@ class _TFLogger(Logger):
del tmp[k] # not useful to tf log these
values = to_tf_values(tmp, ["ray", "tune"])
train_stats = tf.Summary(value=values)
self._file_writer.add_summary(train_stats, result[TRAINING_ITERATION])
t = result.get(TIMESTEPS_TOTAL) or result[TRAINING_ITERATION]
self._file_writer.add_summary(train_stats, t)
iteration_value = to_tf_values({
"training_iteration": result[TRAINING_ITERATION]
}, ["ray", "tune"])
iteration_stats = tf.Summary(value=iteration_value)
self._file_writer.add_summary(iteration_stats,
result[TRAINING_ITERATION])
self._file_writer.add_summary(iteration_stats, t)
def flush(self):
self._file_writer.flush()
+3
View File
@@ -270,6 +270,9 @@ 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("episode_reward_mean") is not None:
pieces.append('{} rew'.format(
format(self.last_result["episode_reward_mean"], '.3g')))