              return
          logger.debug("Analysis update callback received")
          self._reset_session()
  
      def _remove_current_session(self, *args):  # pylint:disable=unused-argument
          """ Remove the current session data on a is_training=False callback """
          if self.vars["is_training"].get():
              return
          logger.debug("Remove current training Analysis callback received")
          self._clear_session()
  
      def _reset_session_info(self):
          """ Reset the session info status to default """
          logger.debug("Resetting session info")
          self.set_info("No session data loaded")
  
 
</s> remove         self.vars["is_training"].trace("w", self._remove_current_session)
 </s> add  </s> remove         self._clear_session()
        session = get_config().session
        if not session.initialized:
 </s> add         if not Session.is_training: </s> remove         msg = "Currently running training session"
        self._session = session
        # Reload the state file to get approx currently training iterations
        self._session.load_state_file()
        self._set_session_summary(msg)
 </s> add         self._clear_session()
        self._set_session_summary("Currently running training session") </s> remove     @property
    def loss(self):
        """ dict: The loss for the current session id for each loss key """
        loss_dict = self.tb_logs.get_loss(session=self.session_id)[self.session_id]
        return loss_dict
 </s> add class SessionsSummary():  # pylint:disable=too-few-public-methods
    """ Performs top level summary calculations for each session ID within the loaded or currently
    training Session for display in the Analysis tree view.
              return
          logger.debug("Analysis update callback received")
          self._reset_session()
  







      def _reset_session_info(self):
          """ Reset the session info status to default """
          logger.debug("Resetting session info")
          self.set_info("No session data loaded")
  
keep keep keep keep replace replace replace 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/display_analysis.py