EpisodeBuffer¶
minari.data_collector.EpisodeBuffer¶
- class minari.data_collector.EpisodeBuffer(id: int | None = None, seed: int | None = None, options: dict | None = None, observations: None | list | dict | tuple = None, actions: None | list | dict | tuple = None, rewards: list = <factory>, terminations: list = <factory>, truncations: list = <factory>, infos: dict | None = None)[source]¶
Contains the data of a single episode.
Attributes¶
- EpisodeBuffer.id: int | None = None¶
- EpisodeBuffer.seed: int | None = None¶
- EpisodeBuffer.observations: None | list | dict | tuple = None¶
- EpisodeBuffer.actions: None | list | dict | tuple = None¶
- EpisodeBuffer.rewards: list¶
- EpisodeBuffer.terminations: list¶
- EpisodeBuffer.truncations: list¶
- EpisodeBuffer.infos: dict | None = None¶
Methods¶
- minari.data_collector.EpisodeBuffer.add_step_data(self, step_data: StepData) EpisodeBuffer ¶
Add step data dictionary to episode buffer.
- Parameters:
step_data (StepData) – dictionary with data for a single step
- Returns:
EpisodeBuffer – episode buffer with appended data
- minari.data_collector.EpisodeBuffer.__len__(self) int ¶
Buffer length.