          """ Update the Tensorflow dependency for global Cuda installs """
          if self._env.is_conda:  # Conda handles Cuda and cuDNN so nothing to do here
              return
          tf_ver = None
          cudnn_inst = self._env.cudnn_version.split(".")
          for key, val in _TENSORFLOW_REQUIREMENTS.items():
              cuda_req = val[0]
              cudnn_req = val[1].split(".")
              if cuda_req == self._env.cuda_version and (cudnn_req[0] == cudnn_inst[0] and
                                                         cudnn_req[1] <= cudnn_inst[1]):
 
</s> remove             cuda_req = val[0]
            cudnn_req = val[1].split(".")
            if cuda_req == self._env.cuda_version and (cudnn_req[0] == cudnn_inst[0] and
                                                       cudnn_req[1] <= cudnn_inst[1]):
 </s> add             cuda_req = next(parse_requirements(f"cuda{val[0]}")).specs
            cudnn_req = next(parse_requirements(f"cudnn{val[1]}")).specs
            if (self._validate_spec(cuda_req, cuda_inst)
                    and self._validate_spec(cudnn_req, cudnn_inst)): </s> remove         self.cuda_path: Optional[str] = None
        self.cuda_version: Optional[str] = None
        self.cudnn_version: Optional[str] = None
 </s> add         self.cuda_path: str | None = None
        self.cuda_version: str | None = None
        self.cudnn_version: str | None = None </s> remove                                        if not pkg[0].startswith("tensorflow-gpu")]
            tf_ver = f"tensorflow-gpu{tf_ver}"

            tf_ver = f"tensorflow-gpu{tf_ver}"
            self._required_packages.append(("tensorflow-gpu",
                                           next(parse_requirements(tf_ver)).specs))
 </s> add                                        if pkg[0] != "tensorflow"]
            tf_ver = f"tensorflow{tf_ver}"
            self._required_packages.append(("tensorflow", next(parse_requirements(tf_ver)).specs)) </s> remove         if backend == "directml" and tf_ver != directml_ver:
            msg = (f"The supported Tensorflow version for DirectML cards is {directml_ver} but "
                   f"you have version {tf_ver} installed. Please install the correct version.")
            self._handle_import_error(msg)
        if backend == "rocm" and tf_ver != rocm_ver:
            msg = (f"The supported Tensorflow version for ROCm cards is {rocm_ver} but "
                   f"you have version {tf_ver} installed. Please install the correct version.")
            self._handle_import_error(msg)
 </s> add  </s> remove                 channel = None if mapping[1] == "" else mapping[1]
 </s> add                 channel = "" if mapping[1] is None else mapping[1]
        cuda_inst = self._env.cuda_version
        cudnn_inst = self._env.cudnn_version
        if len(cudnn_inst) == 1:  # Sometimes only major version is reported
            cudnn_inst = f"{cudnn_inst}.0"
          """ Update the Tensorflow dependency for global Cuda installs """
          if self._env.is_conda:  # Conda handles Cuda and cuDNN so nothing to do here
              return
          tf_ver = None
        cuda_inst = self._env.cuda_version
        cudnn_inst = self._env.cudnn_version
        if len(cudnn_inst) == 1:  # Sometimes only major version is reported
            cudnn_inst = f"{cudnn_inst}.0"
          for key, val in _TENSORFLOW_REQUIREMENTS.items():
              cuda_req = val[0]
              cudnn_req = val[1].split(".")
              if cuda_req == self._env.cuda_version and (cudnn_req[0] == cudnn_inst[0] and
                                                         cudnn_req[1] <= cudnn_inst[1]):
keep keep keep keep replace keep keep keep keep keep
 Rebase code (#1326)

* Remove tensorflow_probability requirement

* setup.py - fix progress bars

* requirements.txt: Remove pre python 3.9 packages

* update apple requirements.txt

* update INSTALL.md

* Remove python<3.9 code

* setup.py - fix Windows Installer

* typing: python3.9 compliant

* Update pytest and readthedocs python versions

* typing fixes

* Python Version updates
  - Reduce max version to 3.10
  - Default to 3.10 in installers
  - Remove incompatible 3.11 tests

* Update dependencies

* Downgrade imageio dep for Windows

* typing: merge optional unions and fixes

* Updates
  - min python version 3.10
  - typing to python 3.10 spec
  - remove pre-tf2.10 code
  - Add conda tests

* train: re-enable optimizer saving

* Update dockerfiles

* Update setup.py
  - Apple Conda deps to setup.py
  - Better Cuda + dependency handling

* bugfix: Patch logging to prevent Autograph errors

* Update dockerfiles

* Setup.py - Setup.py - stdout to utf-8

* Add more OSes to github Actions

* suppress mac-os end to end test 
setup.py