Extracting episode information

  • High: It blocks me to complete my task.

Part of my task involves tracking the action taken and the information returned from the custom environment (info, not state).
obs, rew, done, term, info = env(action)

I know I can set a callback on_episode_step(…) that can recover the data, but any attempt to save that data results in an enormous bottleneck. Is there a way to save it to a persistent growing data structure that can be written / saved at the end?