                  text="Graph updates at every model save. Click to refresh now.",
                  wraplength=200)
          logger.debug("Added refresh option")
  
      def add_option_smoothing(self):
          """ Add refresh button to refresh graph immediately """
          logger.debug("Adding Smoothing Slider")
          tk_var = get_config().tk_vars["smoothgraph"]
          min_max = (0, 0.99)
          hlp = "Set the smoothing amount. 0 is no smoothing, 0.99 is maximum smoothing."
  
 
</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     def add_option_refresh(self):
 </s> add     def _add_option_refresh(self): </s> remove         self.add_option_smoothing()
 </s> add         self._add_option_raw()
        self._add_option_smoothed()
        self._add_option_smoothing()
        self._add_option_iterations() </s> remove         self.add_option_refresh()
 </s> add         self._add_option_refresh() </s> remove         session = get_config().session
        smooth_amount_var = get_config().tk_vars["smoothgraph"]
        if session.initialized and session.logging_disabled:
 </s> add         if Session.is_training and Session.logging_disabled:
    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 """
                  text="Graph updates at every model save. Click to refresh now.",
                  wraplength=200)
          logger.debug("Added refresh option")
  
    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 """
    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 """
          logger.debug("Adding Smoothing Slider")
          tk_var = get_config().tk_vars["smoothgraph"]
          min_max = (0, 0.99)
          hlp = "Set the smoothing amount. 0 is no smoothing, 0.99 is maximum smoothing."
  
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 
lib/gui/display_command.py