      def add_options(self):
          """ Add the additional options """
          self.add_option_refresh()
          super().add_options()
          self.add_option_smoothing()
  
      def add_option_refresh(self):
          """ Add refresh button to refresh graph immediately """
          logger.debug("Adding refresh option")
          tk_var = get_config().tk_vars["refreshgraph"]
 
</s> remove     def add_option_refresh(self):
 </s> add     def _add_option_refresh(self): </s> remove         self.add_option_refresh()
 </s> add         self._add_option_refresh() </s> remove     def add_option_smoothing(self):
        """ Add refresh button to refresh graph immediately """
 </s> add     def _add_option_raw(self):
        """ Add check-button to hide/display raw data """
        logger.debug("Adding display raw option")
        tk_var = self.vars["raw_data"]
        chkbtn = ttk.Checkbutton(
            self.optsframe,
            variable=tk_var,
            text="Raw",
            command=lambda v=tk_var: self._display_data_callback("raw", v))
        chkbtn.pack(side=tk.RIGHT, padx=5, anchor=tk.W)
        Tooltip(chkbtn, text="Display the raw loss data", wraplength=200)

    def _add_option_smoothed(self):
        """ Add check-button to hide/display smoothed data """
        logger.debug("Adding display smoothed option")
        tk_var = self.vars["smooth_data"]
        chkbtn = ttk.Checkbutton(
            self.optsframe,
            variable=tk_var,
            text="Smoothed",
            command=lambda v=tk_var: self._display_data_callback("smoothed", v))
        chkbtn.pack(side=tk.RIGHT, padx=5, anchor=tk.W)
        Tooltip(chkbtn, text="Display the smoothed loss data", wraplength=200)

    def _add_option_smoothing(self):
        """ Add a slider to adjust the smoothing amount """ </s> remove         tk_var = get_config().tk_vars["smoothgraph"]
        min_max = (0, 0.99)
 </s> add         tk_var = self.vars["smoothgraph"]
        min_max = (0, 0.999) </s> remove         self.trace_var = None
 </s> add         self._trace_vars = dict()
        self._add_option_raw()
        self._add_option_smoothed()
        self._add_option_smoothing()
        self._add_option_iterations()
      def add_options(self):
          """ Add the additional options """
          self.add_option_refresh()
          super().add_options()
        self._add_option_raw()
        self._add_option_smoothed()
        self._add_option_smoothing()
        self._add_option_iterations()
  
      def add_option_refresh(self):
          """ Add refresh button to refresh graph immediately """
          logger.debug("Adding refresh option")
          tk_var = get_config().tk_vars["refreshgraph"]
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_command.py