          """
          loss = list(loss)
          timestamps = list(timestamps)
  
          if len(loss[-1]) != len(self._loss_labels):
              logger.debug("Truncated loss found. loss count: %s", len(loss))
              idx = sorted(data)[-1]
              if is_live:
                  logger.debug("Setting carried over data: %s", data[idx])
                  self._carry_over[idx] = data[idx]
              logger.debug("Removing truncated loss: (timestamp: %s, loss: %s)",
 
</s> remove         loss = list(loss)
        timestamps = list(timestamps)
 </s> add         timestamps, loss = zip(*[(data[idx].timestamp, data[idx].loss)
                               for idx in sorted(data)]) </s> remove                          timestamps[-1], loss[-1])
            del loss[-1]
            del timestamps[-1]
 </s> add                          l_timestamps[-1], loss[-1])
            del l_loss[-1]
            del l_timestamps[-1] </s> remove         times, loss = (np.array(times, dtype="float64"), np.array(loss, dtype="float32"))
 </s> add         n_times, n_loss = (np.array(times, dtype="float64"), np.array(loss, dtype="float32")) </s> remove         retval = {}
 </s> add         retval: Dict[int, Dict[str, np.ndarray]] = {} </s> remove             data = self._cache.get_data(idx, "loss")
            if not data:
 </s> add             full_data = self._cache.get_data(idx, "loss")
            if not full_data:
        l_loss: List[List[float]] = list(loss)
        l_timestamps: List[float] = list(timestamps)

        if len(l_loss[-1]) != len(self._loss_labels):
            logger.debug("Truncated loss found. loss count: %s", len(l_loss))
          """
          loss = list(loss)
          timestamps = list(timestamps)
  
        l_loss: List[List[float]] = list(loss)
        l_timestamps: List[float] = list(timestamps)

        if len(l_loss[-1]) != len(self._loss_labels):
            logger.debug("Truncated loss found. loss count: %s", len(l_loss))
        l_loss: List[List[float]] = list(loss)
        l_timestamps: List[float] = list(timestamps)

        if len(l_loss[-1]) != len(self._loss_labels):
            logger.debug("Truncated loss found. loss count: %s", len(l_loss))
              idx = sorted(data)[-1]
              if is_live:
                  logger.debug("Setting carried over data: %s", data[idx])
                  self._carry_over[idx] = data[idx]
              logger.debug("Removing truncated loss: (timestamp: %s, loss: %s)",
keep keep keep keep replace replace keep keep keep keep keep
 Bugfixes
  - plugin.train.unbalanced - decoder b
  - gui.stats - crash when log folder deleted
  - setup.py - install gcc=12.1.0 on linux (scipy dep)
  - setup.py - don't test ROCm unless valid
  - typofix - cli_args extract singleprocess help
typing
  - lib.gui.analysis.event_reader
  - lib.gpu_stats.directml - make platform specific
unit tests
  - lib.gui.analysis.event_reader 
lib/gui/analysis/event_reader.py