              if output:
                  self._process_training_stdout(output)
                  print(output.rstrip())
  
          returncode = self.process.poll()
          message = self.set_final_status(returncode)
          self.wrapper.terminate(message)
          logger.debug("Terminated stdout reader. returncode: %s", returncode)
  
      def read_stderr(self):
          """ Read stdout from the subprocess. If training, pass the loss
          values to Queue """
 
</s> remove     def read_stderr(self):
 </s> add     def _read_stderr(self) -> None: </s> remove     def capture_loss(self, string):
        """ Capture loss values from stdout """
        logger.trace("Capturing loss")
 </s> add     def _capture_loss(self, string: str) -> bool:
        """ Capture loss values from stdout

        Parameters
        ----------
        string: str
            An output line read from stdout

        Returns
        -------
        bool
            ``True`` if a loss line was captured from stdout, otherwise ``False``
        """
        logger.trace("Capturing loss")  # type:ignore[attr-defined] </s> remove                 output = self.process.stdout.readline()
 </s> add                 buff = self._process.stdout
                assert buff is not None
                output: str = buff.readline() </s> remove     def read_stdout(self) -> None:
 </s> add     def _read_stdout(self) -> None:
        returncode = self._process.poll()
        assert returncode is not None
        message = self._set_final_status(returncode)
        self._wrapper.terminate(message)
              if output:
                  self._process_training_stdout(output)
                  print(output.rstrip())
  
        returncode = self._process.poll()
        assert returncode is not None
        message = self._set_final_status(returncode)
        self._wrapper.terminate(message)
        returncode = self._process.poll()
        assert returncode is not None
        message = self._set_final_status(returncode)
        self._wrapper.terminate(message)
        returncode = self._process.poll()
        assert returncode is not None
        message = self._set_final_status(returncode)
        self._wrapper.terminate(message)
          logger.debug("Terminated stdout reader. returncode: %s", returncode)
  
      def read_stderr(self):
          """ Read stdout from the subprocess. If training, pass the loss
          values to Queue """
keep keep keep keep replace replace replace keep keep keep keep keep
 bugfix: GUI force stdout/stderr reading to utf-8 
lib/gui/wrapper.py