# Measuring custom metrics

**URL:** <https://discuss.ray.io/t/measuring-custom-metrics/7751>\
**Category:** RLlib\
**Created:** [October 1, 2022, 7:32pm UTC](https://discuss.ray.io/t/measuring-custom-metrics/7751 "2022-10-01T19:32:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cool-RR](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/cool-rr/32/2821_2.png) [@cool-RR](https://discuss.ray.io/u/cool-RR)\
**Post date:** [October 1, 2022, 7:32pm UTC](https://discuss.ray.io/t/measuring-custom-metrics/7751/1 "2022-10-01T19:32:05Z")

</div>

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

- High: It blocks me to complete my task.

Hi,

I’m using RLlib to train my agents on an environment. I want to collect some metrics about their behavior on every training step. I notice that when I run `ppo.evaluate()`, I get a dict with all kinds of useful metrics (like the reward for each agent) and there’s also a dict called `custom_metrics` which is empty.

I hope it won’t be too presumptious to assums that the `custom_metrics` dict is intended for users to add their own custom metrics. My question is: How do I do that? How do I give RLlib a list of my custom metrics and the logic for measuring each one of them?

Thanks for your help,  
Ram Rachum.

---

<div class="post-metadata">

**Author:** ![cool-RR](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/cool-rr/32/2821_2.png) [@cool-RR](https://discuss.ray.io/u/cool-RR)\
**Post date:** [October 1, 2022, 7:38pm UTC](https://discuss.ray.io/t/measuring-custom-metrics/7751/2 "2022-10-01T19:38:08Z")

</div>

Sorry, I just found the relevant documentation page: [Training APIs — Ray 2.0.0](https://docs.ray.io/en/latest/rllib/rllib-training.html#callbacks-and-custom-metrics)

Please disregard this thread.

Thanks,  
Ram.
