EpisodeMetadataCallback#

minari.EpisodeMetadataCallback#

class minari.EpisodeMetadataCallback[source]#

Callback to full episode after saving to hdf5 file as a group.

This callback can be overridden to add extra metadata attributes or statistics to each HDF5 episode group in the Minari dataset. The custom callback can then be passed to the DataCollectorV0 wrapper to the episode_metadata_callback argument.

TODO: add more default statistics to episode datasets

Methods#

minari.EpisodeMetadataCallback.__call__(self, eps_group: Group)#

Callback method.

Override this method to add custom attribute metadata to the episode group.

Parameters:

eps_group (h5py.Group) – the HDF5 group that contains an episode’s datasets