# Accessing info dicts in postprocessing callback

**URL:** <https://discuss.ray.io/t/accessing-info-dicts-in-postprocessing-callback/118>\
**Category:** RLlib\
**Created:** [December 3, 2020, 12:18am UTC](https://discuss.ray.io/t/accessing-info-dicts-in-postprocessing-callback/118 "2020-12-03T00:18:15Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![sven1977](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/sven1977/32/53_2.png) [@sven1977](https://discuss.ray.io/u/sven1977)\
**Post date:** [December 22, 2020, 12:35pm UTC](https://discuss.ray.io/t/accessing-info-dicts-in-postprocessing-callback/118/9 "2020-12-22T12:35:44Z")

</div>

In the initial call to the loss function (during Policy setup), you should see an all-0s train\_batch being passed into the loss function (including all possible SampleBatch columns).  
Then, if you access some column in your loss function, RLlib will detect this and provide that column in all subsequent calls.

So I just tried this:

- set breakpoint into PPOTorchPolicy’s loss function.
- run the `rllib/agents/ppo/tests/test_ppo.py::test_ppo_compilation_and_lr_schedule` test case with `ray.init(local_mode=True)`
- For the initial test call to the loss, I see “infos” in train\_batch properly initialized with 0s.
- Then, if I access this column in the loss function to tell RLlib that “infos” are needed (e.g. by printing train\_batch[“infos”]), I do see this column also in all subsequent loss calls.

---

_[View the full topic](https://discuss.ray.io/t/accessing-info-dicts-in-postprocessing-callback/118)._
