          logger.trace("Updating TensorBoard log")
          logs = {log[0]: log[1]
                  for log in zip(self._model.state.loss_names, loss)}
  
          self._tensorboard.on_train_batch_end(self._model.iterations, logs=logs)
          if get_tf_version() == 2.8:
              # Bug in TF 2.8 where batch recording got deleted.
              # ref: https://github.com/keras-team/keras/issues/16173
              for name, value in logs.items():
                  tf.summary.scalar(
                      "batch_" + name,
                      value,
 
</s> remove             for name, value in logs.items():
                tf.summary.scalar(
                    "batch_" + name,
                    value,
                    step=self._model._model._train_counter)  # pylint:disable=protected-access
 </s> add             with tf.summary.record_if(True), self._tensorboard._train_writer.as_default():  # noqa pylint:disable=protected-access,not-context-manager
                for name, value in logs.items():
                    tf.summary.scalar(
                        "batch_" + name,
                        value,
                        step=self._tensorboard._train_step)  # pylint:disable=protected-access
        else:
            self._tensorboard.on_train_batch_end(self._model.iterations, logs=logs) </s> remove             # following bug in TF 2.8 when writing records:
 </s> add             # following bug in TF 2.8/2.9 when writing records: </s> remove tensorflow-macos>=2.8.0,<2.9.0
tensorflow-deps>=2.8.0,<2.9.0
tensorflow-metal>=0.4.0,<0.5.0
 </s> add numpy>=1.22.0
tensorflow-macos>=2.8.0,<2.10.0
tensorflow-deps>=2.8.0,<2.10.0
tensorflow-metal>=0.4.0,<0.6.0 </s> remove     def __init__(self, name, model_path, model_kwargs=None, allow_growth=False, exclude_gpus=None):
        logger.trace("Initializing: %s (name: %s, model_path: %s, model_kwargs: %s, "
                     "allow_growth: %s, exclude_gpus: %s)", self.__class__.__name__, name,
                     model_path, model_kwargs, allow_growth, exclude_gpus)
 </s> add     def __init__(self,
                 name: str,
                 model_path: str,
                 model_kwargs: Optional[dict] = None,
                 allow_growth: bool = False,
                 exclude_gpus: Optional[List[int]] = None) -> None:
        logger.trace("Initializing: %s (name: %s, model_path: %s, "  # type:ignore
                     "model_kwargs: %s,  allow_growth: %s, exclude_gpus: %s)",
                     self.__class__.__name__, name, model_path, model_kwargs, allow_growth,
                     exclude_gpus)
        if get_tf_version() > 2.7:
            # Bug in TF 2.8/2.9 where batch recording got deleted.
          logger.trace("Updating TensorBoard log")
          logs = {log[0]: log[1]
                  for log in zip(self._model.state.loss_names, loss)}
  
        if get_tf_version() > 2.7:
            # Bug in TF 2.8/2.9 where batch recording got deleted.
        if get_tf_version() > 2.7:
            # Bug in TF 2.8/2.9 where batch recording got deleted.
        if get_tf_version() > 2.7:
            # Bug in TF 2.8/2.9 where batch recording got deleted.
              # ref: https://github.com/keras-team/keras/issues/16173
              for name, value in logs.items():
                  tf.summary.scalar(
                      "batch_" + name,
                      value,
keep keep keep keep replace replace replace keep keep keep keep keep
 Update TF to 2.9
    - Update TF to 2.7 to 2.9
    - Bump dependencies
    - Remove decode from pynvml calls
    - force keras predict functions to non-verbose
    - update tests
    - update Tensorboard logging
    - Update docs 
plugins/train/trainer/_base.py