          self.tk_vars["runningtask"].set(True)
          self.tk_vars["consoleclear"].set(True)
          print("Loading...")
  
          self.statusbar.status_message.set("Executing - {}.py".format(self.command))
          mode = "indeterminate" if self.command in ("effmpeg", "train") else "determinate"
 
</s> remove         time_stats = {sess_id: {"start_time": min(timestamps),
                                "end_time": max(timestamps),
                                "datapoints": len(timestamps)}
 </s> add         time_stats = {sess_id: {"start_time": min(timestamps) if timestamps else 0,
                                "end_time": max(timestamps) if timestamps else 0,
                                "datapoints": len(timestamps) if timestamps else 0} </s> remove                 self.process.send_signal(signal.SIGINT)
 </s> add                 process.send_signal(signal.SIGINT) </s> remove                 if self.process.poll() is not None:
 </s> add                 if process.poll() is not None: </s> remove         if self.command == "train":
 </s> add         if command == "train":
        if self.command == "train":
            self.tk_vars["istraining"].set(True)
          self.tk_vars["runningtask"].set(True)
          self.tk_vars["consoleclear"].set(True)
        if self.command == "train":
            self.tk_vars["istraining"].set(True)
          print("Loading...")
  
          self.statusbar.status_message.set("Executing - {}.py".format(self.command))
          mode = "indeterminate" if self.command in ("effmpeg", "train") else "determinate"
keep add keep keep keep keep
 GUI responsiveness and feature updates

- Add error handling to LongRunningTask
- Analysis: Fix timestats bug for missing session data
- Training: Update training graph inside LongRunningTask
- Training: Smoothing Amount Slider geometry fix
- Training: Auto update Analysis tab on training start and save interval
- Scripts: Keep control of the UI when terminating by terminating using LongRunningTask 
lib/gui/wrapper.py