      def initialize_globals(self):
          """ Initialize config and images global constants """
          cliopts = CliOptions()
          statusbar = StatusBar(self)
          session = Session()
          config = initialize_config(self, cliopts, statusbar, session)
          initialize_images()
          return config
  
      def set_fonts(self):
          """ Set global default font """
 
</s> remove def initialize_config(root, cli_opts, statusbar, session):
 </s> add def initialize_config(root, cli_opts, statusbar): </s> remove                  "statusbar: %s, session: %s)", root, cli_opts, statusbar, session)
    _CONFIG = Config(root, cli_opts, statusbar, session)
 </s> add                  "statusbar: %s)", root, cli_opts, statusbar)
    _CONFIG = Config(root, cli_opts, statusbar) </s> remove     @staticmethod
    def init_training_session(cliopt):
        """ Set the session stats for disable logging, model folder and model name """
        session = get_config().session
        if cliopt[0] == "-t":
            session.modelname = cliopt[1].lower().replace("-", "_")
            logger.debug("modelname: '%s'", session.modelname)
        if cliopt[0] == "-m":
            session.modeldir = cliopt[1]
            logger.debug("modeldir: '%s'", session.modeldir)
 </s> add     def _get_training_session_info(self, cli_option):
        """ Set the model folder and model name to :`attr:_training_session_location` so the global
        session picks them up for logging to the graph and analysis tab.

        Parameters
        ----------
        cli_option: list
            The command line option to be checked for model folder or name
        """
        if cli_option[0] == "-t":
            self._training_session_location["model_name"] = cli_option[1].lower().replace("-", "_")
            logger.debug("model_name: '%s'", self._training_session_location["model_name"])
        if cli_option[0] == "-m":
            self._training_session_location["model_folder"] = cli_option[1]
            logger.debug("model_folder: '%s'", self._training_session_location["model_folder"]) </s> remove     @property
    def total_timestamps(self):
        """ Return timestamps from logs separated per session for all sessions """
        return self.tb_logs.get_timestamps()

    def initialize_session(self, is_training=False, session_id=None):
        """ Initialize the training session """
        logger.debug("Initializing session: (is_training: %s, session_id: %s)",
                     is_training, session_id)
        self.load_state_file()
        self.tb_logs = TensorBoardLogs(os.path.join(self.modeldir,
                                                    "{}_logs".format(self.modelname)))
        if is_training:
            self.session_id = max(int(key) for key in self.state["sessions"].keys())
        else:
            self.session_id = session_id
        self.initialized = True
        logger.debug("Initialized session. Session_ID: %s", self.session_id)
 </s> add             session_id = Session.session_ids[-1]
            latest = self._session.get_timestamps(session_id) </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
        config = initialize_config(self, cliopts, statusbar)
      def initialize_globals(self):
          """ Initialize config and images global constants """
          cliopts = CliOptions()
          statusbar = StatusBar(self)
        config = initialize_config(self, cliopts, statusbar)
        config = initialize_config(self, cliopts, statusbar)
          initialize_images()
          return config
  
      def set_fonts(self):
          """ Set global default font """
keep keep keep keep 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 
scripts/gui.py