              if any(char in package for char in (" ", "<", ">", "*", "|")):
                  package = f"\"{package}\""
              condaexe.append(package)
  
          self.output.info("Installing {}".format(package.replace("\"", "")))
          shell = self.env.os_version[0] == "Windows"
          try:
              if verbose:
                  run(condaexe, check=True, shell=shell)
              else:
 
</s> remove                 with open(os.devnull, "w") as devnull:
 </s> add                 with open(os.devnull, "w", encoding="utf8") as devnull: </s> remove         requirements = list()
        git_requirements = list()
 </s> add         requirements = []
        git_requirements = [] </s> remove             with open(requirements_file) as req:
 </s> add             with open(requirements_file, encoding="utf8") as req: </s> remove             chk = Popen(condaexe + [pkg], shell=shell, stdout=PIPE)
            available = [line.split()
                         for line in chk.communicate()[0].decode(self.env.encoding).splitlines()
                         if line.startswith(pkg)]
            compatible = [req for req in available
                          if (pkg == "cudatoolkit" and req[1].startswith(versions[0]))
                          or (pkg == "cudnn" and versions[0] in req[2]
                              and req[1].startswith(versions[1]))]
 </s> add             with Popen(condaexe + [pkg], shell=shell, stdout=PIPE) as chk:
                available = [line.split()
                             for line
                             in chk.communicate()[0].decode(self.env.encoding).splitlines()
                             if line.startswith(pkg)]
                compatible = [req for req in available
                              if (pkg == "cudatoolkit" and req[1].startswith(versions[0]))
                              or (pkg == "cudnn" and versions[0] in req[2]
                                  and req[1].startswith(versions[1]))]
 </s> remove         output = ", ".join(["Loss {}: {:.5f}".format(side, side_loss)
 </s> add         output = ", ".join([f"Loss {side}: {side_loss:.5f}"
        clean_pkg = package.replace("\"", "")
        self.output.info(f"Installing {clean_pkg}")
              if any(char in package for char in (" ", "<", ">", "*", "|")):
                  package = f"\"{package}\""
              condaexe.append(package)
  
        clean_pkg = package.replace("\"", "")
        self.output.info(f"Installing {clean_pkg}")
          shell = self.env.os_version[0] == "Windows"
          try:
              if verbose:
                  run(condaexe, check=True, shell=shell)
              else:
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