Esempio n. 1
0
 def log_mpl_plotly_chart(self, name, figure, step=None, timestamp=None):
     chart = events_processors.mpl_plotly_chart(figure=figure)
     logged_event = LoggedEventSpec(
         name=name,
         kind=V1ArtifactKind.CHART,
         event=V1Event(timestamp=timestamp, step=step, chart=chart),
     )
     self._event_logger.add_event(logged_event)
Esempio n. 2
0
    def log_mpl_plotly_chart(self, name, figure, step=None, timestamp=None):
        """Logs a matplotlib figure to plotly figure.

        Args:
            name: str, name of the figure
            figure: figure
            step: int, optional
            timestamp: datetime, optional
        """
        self._log_has_events()

        chart = events_processors.mpl_plotly_chart(figure=figure)
        logged_event = LoggedEventSpec(
            name=name,
            kind=V1ArtifactKind.CHART,
            event=V1Event.make(timestamp=timestamp, step=step, chart=chart),
        )
        self._event_logger.add_event(logged_event)