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 episode in the Minari dataset. The custom callback can then be passed to the DataCollector wrapper to the episode_metadata_callback argument.

Methods

minari.EpisodeMetadataCallback.__call__(self, episode: Dict) Dict

Callback method.

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

Parameters:

episode (dict) – the dict that contains an episode’s data

Returns:

Dict – episode metadata.