class_docstr: 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 :class:`~maze.core.log_events.log_events_writer_tsv.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.
  
  :param: event_logs_dir_path: Path to directory where the event logs are stored.
class_docstr_tok: ["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",":","class",":","`","~maze.core.log_events.log_events_writer_tsv.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",".",":","param",":","event_logs_dir_path",":","Path","to","directory","where","the","event","logs","are","stored","."]
docstr: Build the interactive viewer. Expected to be called in a Jupyter notebook after initialization.
docstr_tok: ["Build","the","interactive","viewer",".","Expected","to","be","called","in","a","Jupyter","notebook","after","initialization","."]
code: def build(self) -> None:
      """Build the interactive viewer. Expected to be called in a Jupyter notebook after initialization."""
      from ipywidgets import interact, widgets
  
      self.event_name_widget = widgets.Dropdown(
          options=self.event_log_options,
          value=self.event_log_options[0][1],
          description="Event name:",
      )
  
      initial_columns = self._read_column_options(
          self.event_log_options[0][1]
      )
  
      self.metric_widget = widgets.Dropdown(
          options=initial_columns,
          value=initial_columns[0],
          description="Metric:",
      )
  
      self.group_by_widget = widgets.Dropdown(
          options=self._options_with_none(initial_columns),
          description="Group by:",
      )
  
      self.event_name_widget.observe(
          self.update_column_options, "value"
      )
  
      self.aggregation_func_widget = widgets.Dropdown(
          options=self._options_with_none(
              EventStatsRenderer.AGGREGATION_FUNCS
          ),
          description="Aggregate:",
      )
  
      self.post_processing_func_widget = widgets.Dropdown(
          options=self._options_with_none(
              EventStatsRenderer.POST_PROCESSING_FUNCS
          ),
          description="Post-process:",
      )
  
      interact(
          self.render,
          event_path=self.event_name_widget,
          metric_name=self.metric_widget,
          group_by=self.group_by_widget,
          aggregation_func=self.aggregation_func_widget,
          post_processing_func=self.post_processing_func_widget,
      )
  
file_path: maze/maze/core/rendering/notebook_event_logs_viewer.py
imports: from pathlib import Path
  from typing import Union, Dict, Any, List, Tuple, Optional
  import matplotlib.pyplot
  import pandas
  from maze.core.rendering.events_stats_renderer import EventStatsRenderer
label_desc: Use image node_id 2 for calling the NotebookEventLogsViewer obj's underlying member method code with example usage: obj.build() without return types