              self._stats.tree_insert_data(self._summary)
  
      @classmethod
      def _summarise_data(cls, session):
          """ Summarize data in a LongRunningThread as it can take a while """
          return session.full_summary
  
      def _clear_session(self):
          """ Clear the currently displayed analysis data from the Tree-View. """
          logger.debug("Clearing session")
 
</s> remove             self._stats.session = self._session
 </s> add  </s> remove         if self._session is None:
 </s> add         if not Session.is_loaded: </s> remove         """ Clear the totals tree """
 </s> add         """ Clear all of the summary data from the tree-view. """ </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         self.vars["is_training"].trace("w", self._remove_current_session)
 </s> add 
        """ Summarize data in a LongRunningThread as it can take a while.

        Parameters
        ----------
        session: :class:`lib.gui.stats.Session`
            The session object to generate the summary for
        """
              self._stats.tree_insert_data(self._summary)
  
      @classmethod
      def _summarise_data(cls, session):
        """ Summarize data in a LongRunningThread as it can take a while.

        Parameters
        ----------
        session: :class:`lib.gui.stats.Session`
            The session object to generate the summary for
        """
          return session.full_summary
  
      def _clear_session(self):
          """ Clear the currently displayed analysis data from the Tree-View. """
          logger.debug("Clearing session")
keep keep keep keep 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