# Learning curves

**URL:** <https://discuss.ray.io/t/learning-curves/5356>\
**Category:** Ray Tune\
**Created:** [March 9, 2022, 6:41pm UTC](https://discuss.ray.io/t/learning-curves/5356 "2022-03-09T18:41:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Constantine\_Bardis](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/constantine_bardis/32/2074_2.png) [@Constantine\_Bardis](https://discuss.ray.io/u/Constantine_Bardis)\
**Post date:** [March 9, 2022, 6:41pm UTC](https://discuss.ray.io/t/learning-curves/5356/1 "2022-03-09T18:41:32Z")

</div>

**How severe does this issue affect your experience of using Ray?**

- None: Just asking a question out of curiosity
- [x] Low: It annoys or frustrates me for a moment.
- Medium: It contributes to significant difficulty to complete my task but I work arounds and get it resolved.
- High: It blocks me to complete my task.

Hello,

I would like to ask, how can I get the learning curve of the mean reward per episode per trial in a multi-agent hyperparameter search, like on the picture I attach (taken from the MADDPG paper)?

I only get scalar quantities at the end of each trial, while what I want is the mean reward across episodes for plotting reasons, and I am not sure at all how to approach that. Am I missing some obvious functionality? I am relatively new to Ray and Multi-Agent RL so excuse my questions if it is too noob-ish.

![lr curve](https://us1.discourse-cdn.com/flex020/uploads/ray/original/2X/3/3c0db5935e4ef3adc4ef4e8daec47ad066e0c5b8.png)

---

<div class="post-metadata">

**Author:** ![matthewdeng](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/matthewdeng/32/1446_2.png) [@matthewdeng](https://discuss.ray.io/u/matthewdeng)\
**Post date:** [March 9, 2022, 11:08pm UTC](https://discuss.ray.io/t/learning-curves/5356/2 "2022-03-09T23:08:19Z")

</div>

Hi @Constantine_Bardis,

If you are using RLlib for this, then this information will be logged for you as a TensorBoard file!

1. During your Tune run, the logdir will be printed to STDOUT:

```auto
Result logdir: <path>

```

1. You can then visualize these metrics (along with others) by opening them with Tensorboard:

```auto
tensorboard --logdir <path>

```

 ![image](https://us1.discourse-cdn.com/flex020/uploads/ray/original/2X/2/2623b9f6d5e0c4d394a78fdc9cc47bb9d8510ed6.png)

---

<div class="post-metadata">

**Author:** ![Constantine\_Bardis](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/constantine_bardis/32/2074_2.png) [@Constantine\_Bardis](https://discuss.ray.io/u/Constantine_Bardis)\
**Post date:** [March 12, 2022, 11:05am UTC](https://discuss.ray.io/t/learning-curves/5356/3 "2022-03-12T11:05:03Z")

</div>

Hello,

Yes I managed to run them on tensorboard once I downloaded the log files locally since I presume there is no easy support when running them in Kaggle notebooks…Many thanks for the prompt reply!

I would also like to ask, from the columns that are returned, there are some that are called “hist\_stats/…”. What are these? I think I have them for each agent’s rewards accumulated

---

<div class="post-metadata">

**Author:** ![matthewdeng](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/matthewdeng/32/1446_2.png) [@matthewdeng](https://discuss.ray.io/u/matthewdeng)\
**Post date:** [March 13, 2022, 1:18am UTC](https://discuss.ray.io/t/learning-curves/5356/4 "2022-03-13T01:18:46Z")

</div>

Awesome! `hist_stats` contains some RLlib episode metrics. You can see how `hist_stats` is computed [here](https://github.com/ray-project/ray/blob/master/rllib/evaluation/metrics.py#L131-L242).

---

<div class="post-metadata">

**Author:** ![Constantine\_Bardis](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/constantine_bardis/32/2074_2.png) [@Constantine\_Bardis](https://discuss.ray.io/u/Constantine_Bardis)\
**Post date:** [March 15, 2022, 8:45am UTC](https://discuss.ray.io/t/learning-curves/5356/5 "2022-03-15T08:45:18Z")

</div>

Many thanks, I was actually curious as to how that hist stats were computed!

One final question, a little irrelevant: Do you have any tips on how to make QMIX and agent grouping work for PettingZoo? I had posed the code I wrote while trying to make it work but I never got an answer and haven’t figured it out yet…

---

<div class="post-metadata">

**Author:** ![matthewdeng](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/matthewdeng/32/1446_2.png) [@matthewdeng](https://discuss.ray.io/u/matthewdeng)\
**Post date:** [March 15, 2022, 4:33pm UTC](https://discuss.ray.io/t/learning-curves/5356/6 "2022-03-15T16:33:12Z")

</div>

Unfortunately I’m not familiar enough with RLlib to provide any substantial advice here. Can you post your question in the [RLlib - Ray](https://discuss.ray.io/c/rllib/7) topic?
