Returns: mean, max: two stats of the runners, to be added to backend
(self)
| 239 | self._runners[0].step(exploration) |
| 240 | |
| 241 | def reset_stats(self): |
| 242 | """ |
| 243 | Returns: |
| 244 | mean, max: two stats of the runners, to be added to backend |
| 245 | """ |
| 246 | scores = list(itertools.chain.from_iterable([v.total_scores for v in self._runners])) |
| 247 | for v in self._runners: |
| 248 | v.total_scores.clear() |
| 249 | |
| 250 | try: |
| 251 | return np.mean(scores), np.max(scores) |
| 252 | except Exception: |
| 253 | logger.exception("Cannot compute total scores in EnvRunner.") |
| 254 | return None, None |
| 255 | |
| 256 | |
| 257 | class ExpReplay(DataFlow, Callback): |