              return None
          chk = os.popen("conda list").read()
          installed = [re.sub(" +", " ", line.strip())
                       for line in chk.splitlines() if not line.startswith("#")]
          retval = dict()
          for pkg in installed:
              item = pkg.split(" ")
              retval[item[0]] = item[1]
          return 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             retval = loss_keys[session_id]
 </s> add             retval = loss_keys.get(session_id) </s> remove         retval = dict()
 </s> add         retval = {} </s> remove             retval = loss_dict.get(session_id, dict())
 </s> add             retval = loss_dict.get(session_id, {}) </s> remove             retval = dict()
 </s> add             retval = {}
        retval = {}
              return None
          chk = os.popen("conda list").read()
          installed = [re.sub(" +", " ", line.strip())
                       for line in chk.splitlines() if not line.startswith("#")]
        retval = {}
          for pkg in installed:
              item = pkg.split(" ")
              retval[item[0]] = item[1]
          return retval
  
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