  
          updatepreview = tk.BooleanVar()
          updatepreview.set(False)
  
          tk_vars = {"display": display,
                     "runningtask": runningtask,
                     "action": actioncommand,
                     "generate": generatecommand,
                     "consoleclear": consoleclear,
 
</s> remove                    "updatepreview": updatepreview}
 </s> add                    "updatepreview": updatepreview,
                   "traintimeout": traintimeout} </s> remove                     else:
                        continue
 </s> add                     continue </s> remove             logger.debug("Termination timed out. Killing Process...")
            print("Termination timed out. Killing Process...")
 </s> add     @staticmethod
    def terminate_all_children():
        """ Terminates all children """
        logger.debug("Terminating Process...")
        print("Terminating Process...", flush=True)
        children = psutil.Process().children(recursive=True)
        for child in children:
            child.terminate()
        _, alive = psutil.wait_procs(children, timeout=10)
        if not alive:
            logger.debug("Terminated")
            print("Terminated")
            return

        logger.debug("Termination timed out. Killing Process...")
        print("Termination timed out. Killing Process...", flush=True)
        for child in alive:
            child.kill()
        _, alive = psutil.wait_procs(alive, timeout=10)
        if not alive:
            logger.debug("Killed")
            print("Killed")
        else: </s> remove                 child.kill()
            _, alive = psutil.wait_procs(alive, timeout=10)
            if not alive:
                logger.debug("Killed")
                print("Killed")
            else:
                for child in alive:
                    msg = "Process {} survived SIGKILL. Giving up".format(child)
                    logger.debug(msg)
                    print(msg)
 </s> add                 msg = "Process {} survived SIGKILL. Giving up".format(child)
                logger.debug(msg)
                print(msg) </s> remove             logger.debug("Terminating Process...")
            print("Terminating Process...")
            children = psutil.Process().children(recursive=True)
            for child in children:
                child.terminate()
            _, alive = psutil.wait_procs(children, timeout=10)
            if not alive:
                logger.debug("Terminated")
                print("Terminated")
                return
 </s> add             self.terminate_all_children()
        traintimeout = tk.IntVar()
        traintimeout.set(120)

  
          updatepreview = tk.BooleanVar()
          updatepreview.set(False)
  
        traintimeout = tk.IntVar()
        traintimeout.set(120)

          tk_vars = {"display": display,
                     "runningtask": runningtask,
                     "action": actioncommand,
                     "generate": generatecommand,
                     "consoleclear": consoleclear,
keep keep keep add keep keep keep keep keep
 Add timeout slider to train tab. Terminate properly on timeout 
lib/gui/utils.py