class maze.core.rendering.notebook_event_logs_viewer.NotebookEventLogsViewer(event_logs_dir_path: Union[str, pathlib.Path])

Event logs viewer for Jupyter Notebooks, built using ipython widgets.

Usage: Inside a Jupyter Notebook, initialize the viewer with path to event logs directory, then call build().

This viewer offers elementary rendering functionality for event logs collected during environment rollout. Event logs are expected to be passed in as a set of TSV with filenames corresponding to event names, the default format as written out using the LogEventsWriterTSV.

The logs will be passed and a set of widgets will be shown, offering options on which event to display and what event attribute to use as a metric.

Statics are always aggregated on episode level – the timeline displays mean value along with standard deviation (displayed as a ribbon).

Optionally, events can be grouped by another attribute (e.g., distribution center ID in multi-echelon inventory environment) and aggregated on step level – this way, we can show e.g. mean value of items stored by each distribution center across all the episodes. This can be configured using the widgets as well.


event_logs_dir_path: Path to directory where the event logs are stored.


Build the interactive viewer. Expected to be called in a Jupyter notebook after initialization.

render(event_path, **kwargs)None

Refresh the rendered view. Called by ipywidgets on widget update.

update_column_options(metadata: Dict[str, Any])

Called by ipywidgets interact module when the user selects a different event to display. Loads attributes available for this event and updates the metric and group_by widget options accordingly.