          logger.trace("Updating TensorBoard log")  # type: ignore
          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.
              # ref: https://github.com/keras-team/keras/issues/16173
              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(
 
</s> remove         amd_ver = 2.2
        min_ver = 2.7
        max_ver = 2.9
 </s> add         amd_ver = (2, 2)
        min_ver = (2, 7)
        max_ver = (2, 9) </s> remove         _TF_VERS = float(".".join(tf.__version__.split(".")[:2]))  # pylint:disable=no-member
 </s> add         split = tf.__version__.split(".")[:2]
        _TF_VERS = (int(split[0]), int(split[1])) </s> remove _TF_VERS: Optional[float] = None
 </s> add _TF_VERS: Optional[Tuple[int, int]] = None </s> remove def get_tf_version() -> float:
 </s> add def get_tf_version() -> Tuple[int, int]: </s> remove     tf_min: float = 2.0
 </s> add     tf_min: Tuple[int, int] = (2, 0)
        if get_tf_version() > (2, 7):
          logger.trace("Updating TensorBoard log")  # type: ignore
          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.
              # ref: https://github.com/keras-team/keras/issues/16173
              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(
keep keep keep keep replace keep keep keep keep keep
 Bugfix - TF Version check 
plugins/train/trainer/_base.py