      def lowest_loss(self):
          """ Return the lowest average loss per save iteration seen """
          return self.state["lowest_avg_loss"]
  
      @property
      def session(self):
          """ Return current session dictionary """
          return self.state["sessions"].get(str(self.session_id), dict())
  
      @property
      def session_ids(self):
          """ Return sorted list of all existing session ids in the state file """
          return sorted([int(key) for key in self.state["sessions"].keys()])
 
</s> remove     @property
    def session_ids(self):
        """ Return sorted list of all existing session ids in the state file """
        return sorted([int(key) for key in self.state["sessions"].keys()])
 </s> add         Format the stats for display </s> remove     @property
    def lowest_loss(self):
        """ Return the lowest average loss per save iteration seen """
        return self.state["lowest_avg_loss"]
 </s> add         self._time_stats = None
        self._per_session_stats = None
        logger.debug("Initialized %s", self.__class__.__name__) </s> remove     @property
    def loss_keys(self):
        """ list: The loss keys for the current session, or loss keys for all sessions. """
        if self.session_id is None:
            retval = self._total_loss_keys
        else:
            retval = self.session["loss_names"]
        return retval
 </s> add     Parameters
    ----------
    session: :class:`GlobalSession`
        The loaded or currently training session
    """
    def __init__(self, session):
        logger.debug("Initializing %s: (session: %s)", self.__class__.__name__, session)
        self._session = session
        self._state = session._state </s> remove     @property
    def timestamps(self):
        """ Return timestamps from logs for current session """
        ts_dict = self.tb_logs.get_timestamps(session=self.session_id)
        return ts_dict[self.session_id]
 </s> add         Returns
        -------
        list
            A list of summary statistics dictionaries containing the Session ID, start time, end
            time, elapsed time, rate, batch size and number of iterations for each session id
            within the loaded data as well as the totals.
        """
        logger.debug("Compiling sessions summary data")
        self._get_time_stats()
        self._get_per_session_stats()
        if not self._per_session_stats:
            return self._per_session_stats

        total_stats = self._total_stats()
        retval = self._per_session_stats + [total_stats]
        retval = self._format_stats(retval)
        logger.debug("Final stats: %s", retval)
        return retval </s> remove     @property
    def total_iterations(self):
        """ Return session iterations """
        return self.state["iterations"]
 </s> add         If the main Session is currently training, then the training session ID is updated with the
        latest stats.
        """
        if self._time_stats is None:
            logger.debug("Collating summary time stamps")
    def get_summary_stats(self):
        """ Compile the individual session statistics and calculate the total.
      def lowest_loss(self):
          """ Return the lowest average loss per save iteration seen """
          return self.state["lowest_avg_loss"]
  
    def get_summary_stats(self):
        """ Compile the individual session statistics and calculate the total.
    def get_summary_stats(self):
        """ Compile the individual session statistics and calculate the total.
    def get_summary_stats(self):
        """ Compile the individual session statistics and calculate the total.
    def get_summary_stats(self):
        """ Compile the individual session statistics and calculate the total.
  
      @property
      def session_ids(self):
          """ Return sorted list of all existing session ids in the state file """
          return sorted([int(key) for key in self.state["sessions"].keys()])
keep keep keep keep replace replace replace replace keep keep keep keep keep
 GUI - Stats optimization (#1067)

* Faster stat loading + caching

* Compress data in cache

* Optimize some calculations

* Vectorize smoothing

* stats.Calculations optimized

* Load latest training data from live iterator

* Add options to training graph 
lib/gui/stats.py