# Is callback methods deprecated?

**URL:** <https://discuss.ray.io/t/is-callback-methods-deprecated/10507>\
**Category:** RLlib\
**Created:** [May 4, 2023, 9:15am UTC](https://discuss.ray.io/t/is-callback-methods-deprecated/10507 "2023-05-04T09:15:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hossein836](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/hossein836/32/2559_2.png) [@hossein836](https://discuss.ray.io/u/hossein836)\
**Post date:** [May 4, 2023, 9:15am UTC](https://discuss.ray.io/t/is-callback-methods-deprecated/10507/1 "2023-05-04T09:15:13Z")

</div>

I have written some callbacks using episode.last\_info\_for() it ran ok. I migrated to ray 2.3 and now I get error because episode\_V2 doesn’t have these methods, I didn’t find anything related to deprecating these methods in callbacks, how can I write callbacks now?

---

<div class="post-metadata">

**Author:** ![Rohan138](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/rohan138/32/1160_2.png) [@Rohan138](https://discuss.ray.io/u/Rohan138)\
**Post date:** [May 24, 2023, 2:57am UTC](https://discuss.ray.io/t/is-callback-methods-deprecated/10507/2 "2023-05-24T02:57:32Z")

</div>

Try using `episode._last_infos[agent_id]`, where agent\_id is either the agent\_id you want the infos for or taken from`ray.rllib.env.base_env import _DUMMY_AGENT_ID`. Please open a Github issue if this does not work for you.
