[rllib] format with yapf (#2427)

* initial yapf

* manual fix yapf bugs
This commit is contained in:
Eric Liang
2018-07-19 15:30:36 -07:00
committed by GitHub
parent 24eb140e07
commit d01dc9e22d
86 changed files with 1276 additions and 978 deletions
@@ -51,10 +51,13 @@ class SyncSamplesOptimizer(PolicyOptimizer):
return fetches
def stats(self):
return dict(PolicyOptimizer.stats(self), **{
"sample_time_ms": round(1000 * self.sample_timer.mean, 3),
"grad_time_ms": round(1000 * self.grad_timer.mean, 3),
"update_time_ms": round(1000 * self.update_weights_timer.mean, 3),
"opt_peak_throughput": round(self.grad_timer.mean_throughput, 3),
"opt_samples": round(self.grad_timer.mean_units_processed, 3),
})
return dict(
PolicyOptimizer.stats(self), **{
"sample_time_ms": round(1000 * self.sample_timer.mean, 3),
"grad_time_ms": round(1000 * self.grad_timer.mean, 3),
"update_time_ms": round(1000 * self.update_weights_timer.mean,
3),
"opt_peak_throughput": round(self.grad_timer.mean_throughput,
3),
"opt_samples": round(self.grad_timer.mean_units_processed, 3),
})