# Custom Tensorboard Metric (episode.total\_reward auto generates as mean, min, max)

**URL:** <https://discuss.ray.io/t/custom-tensorboard-metric-episode-total-reward-auto-generates-as-mean-min-max/14944>\
**Category:** RLlib\
**Created:** [June 11, 2024, 8:45pm UTC](https://discuss.ray.io/t/custom-tensorboard-metric-episode-total-reward-auto-generates-as-mean-min-max/14944 "2024-06-11T20:45:41Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![VisionZUS29](https://avatars.discourse-cdn.com/v4/letter/v/ea666f/32.png) [@VisionZUS29](https://discuss.ray.io/u/VisionZUS29)\
**Post date:** [June 12, 2024, 3:43am UTC](https://discuss.ray.io/t/custom-tensorboard-metric-episode-total-reward-auto-generates-as-mean-min-max/14944/5 "2024-06-12T03:43:01Z")

</div>

@mannyv  
I get the gist of what you are saying. I understand the difference in mean, min, max.

> [@Meaning of episode\_reward\_mean](https://discuss.ray.io/t/meaning-of-episode-reward-mean/3839/4):
>
> RLLIB collects a number of metrics. One of those is the episode\_reward. When creating the summary it will compute and store the mean, min , and max of those metrics.  
> The metrics summarize all of the collected values during the previous iteration. What defines an iteration varies. If you are using PPO, for example, the episode reward will contain the rewards obtained for every completed episode that occurred when collecting the last `train_batch_size` steps. If no episodes returned done which is possible for some really long environments, then that metric would be empty.

So why can’t I plot every episode reward for every completed episode that occurred throughout the training? If it’s already being collected and sorted per train\_batch\_size?

---

_[View the full topic](https://discuss.ray.io/t/custom-tensorboard-metric-episode-total-reward-auto-generates-as-mean-min-max/14944)._
