ray.rllib.env.multi_agent_episode.MultiAgentEpisode.add_temporary_timestep_data#

MultiAgentEpisode.add_temporary_timestep_data(key: str, data: Any) None[source]#

Temporarily adds (until to_numpy() called) per-timestep data to self.

The given data is appended to a list (self._temporary_timestep_data), which is cleared upon calling self.to_numpy(). To get the thus-far accumulated temporary timestep data for a certain key, use the get_temporary_timestep_data API. Note that the size of the per timestep list is NOT checked or validated against the other, non-temporary data in this episode (like observations).

Parameters:
  • key – The key under which to find the list to append data to. If data is the first data to be added for this key, start a new list.

  • data – The data item (representing a single timestep) to be stored.