                  pkg = CONDA_MAPPING.get(pkg, (pkg, None))
                  channel = None if len(pkg) != 2 else pkg[1]
                  pkg = pkg[0]
              if version:
                  pkg = "{}{}".format(pkg, ",".join("".join(spec) for spec in version))
              if self.env.is_conda and not pkg.startswith("git"):
                  if pkg.startswith("tensorflow-gpu"):
                      # From TF 2.4 onwards, Anaconda Tensorflow becomes a mess. The version of 2.5
                      # installed by Anaconda is compiled against an incorrect numpy version which
                      # breaks Tensorflow. Coupled with this the versions of cudatoolkit and cudnn
 
</s> remove             tf_ver = "tensorflow-gpu{}".format(tf_ver)
 </s> add             tf_ver = f"tensorflow-gpu{tf_ver}" </s> remove         vers = self._tf_version
        kwargs = dict(loss_scale="dynamic") if vers[0] == 2 and vers[1] < 4 else dict()
        logger.debug("tf version: %s, kwargs: %s", vers, kwargs)
 </s> add         kwargs = dict(loss_scale="dynamic") if get_tf_version() < 2.4 else {}
        logger.debug("tf version: %s, kwargs: %s", get_tf_version(), kwargs) </s> remove         retval = dict()
 </s> add         retval = {} </s> remove         installed_packages = dict()
        chk = Popen("\"{}\" -m pip freeze".format(sys.executable),
                    shell=True, stdout=PIPE)
        installed = chk.communicate()[0].decode(self.encoding).splitlines()
 </s> add         installed_packages = {}
        with Popen(f"\"{sys.executable}\" -m pip freeze", shell=True, stdout=PIPE) as chk:
            installed = chk.communicate()[0].decode(self.encoding).splitlines() </s> remove         chk = Popen("nvcc -V", shell=True, stdout=PIPE, stderr=PIPE)
        stdout, stderr = chk.communicate()
 </s> add         with Popen("nvcc -V", shell=True, stdout=PIPE, stderr=PIPE) as chk:
            stdout, stderr = chk.communicate()
                pkg = f"{pkg}{','.join(''.join(spec) for spec in version)}"
                  pkg = CONDA_MAPPING.get(pkg, (pkg, None))
                  channel = None if len(pkg) != 2 else pkg[1]
                  pkg = pkg[0]
              if version:
                pkg = f"{pkg}{','.join(''.join(spec) for spec in version)}"
              if self.env.is_conda and not pkg.startswith("git"):
                  if pkg.startswith("tensorflow-gpu"):
                      # From TF 2.4 onwards, Anaconda Tensorflow becomes a mess. The version of 2.5
                      # installed by Anaconda is compiled against an incorrect numpy version which
                      # breaks Tensorflow. Coupled with this the versions of cudatoolkit and cudnn
keep keep keep keep replace keep keep keep keep keep
 Update code to support Tensorflow versions up to 2.8 (#1213)

* Update maximum tf version in setup + requirements

* - bump max version of tf version in launcher
- standardise tf version check

* update keras get_custom_objects  for tf>2.6

* bugfix: force black text in GUI file dialogs (linux)

* dssim loss - Move to stock tf.ssim function

* Update optimizer imports for compatibility

* fix logging for tf2.8

* Fix GUI graphing for TF2.8

* update tests

* bump requirements.txt versions

* Remove limit on nvidia-ml-py

* Graphing bugfixes
  - Prevent live graph from displaying if data not yet available

* bugfix: Live graph. Collect loss labels correctly

* fix: live graph - swallow inconsistent loss errors

* Bugfix: Prevent live graph from clearing during training

* Fix graphing for AMD 
setup.py