Skip to content

hydrate_agent_episode_totals ​

python
hydrate_agent_episode_totals(data: dict[str, Any]) -> dict[str, Any]

Replace the raw episode_totals/tester_episode_totals dict values in asdict()-style checkpoint data with hydrated AgentEpisodeTotalsState instances, ready to splat into a PPOState/DQNState constructor.

Parameters:

  • data (dict[str, Any]) – Raw checkpoint data as produced by dataclasses.asdict.

Returns:

  • dict[str, Any] – A copy of data with both episode-totals fields hydrated.

Source