          return self._tb_logs.session_ids
  
      def _load_state_file(self):
          """ Load the current state file to :attr:`_state`. """
          state_file = os.path.join(self._model_dir, "{}_state.json".format(self._model_name))
          logger.debug("Loading State: '%s'", state_file)
          serializer = get_serializer("json")
          self._state = serializer.load(state_file)
          logger.debug("Loaded state: %s", self._state)
  
 
</s> remove         self._config = state.get("config", dict())
 </s> add         self._config = state.get("config", {}) </s> remove         self._sessions = state.get("sessions", dict())
        self._lowest_avg_loss = state.get("lowest_avg_loss", dict())
 </s> add         self._sessions = state.get("sessions", {})
        self._lowest_avg_loss = state.get("lowest_avg_loss", {}) </s> remove         self._state = dict()
 </s> add         self._state = {} </s> remove         filename = os.path.join(location,
                                "{}_{}.{}".format(filename,
                                                  now,
                                                  "png"))
 </s> add         filename = os.path.join(location, f"{filename}_{now}.png") </s> remove         retval = dict()
 </s> add         retval = {}
        state_file = os.path.join(self._model_dir, f"{self._model_name}_state.json")
          return self._tb_logs.session_ids
  
      def _load_state_file(self):
          """ Load the current state file to :attr:`_state`. """
        state_file = os.path.join(self._model_dir, f"{self._model_name}_state.json")
          logger.debug("Loading State: '%s'", state_file)
          serializer = get_serializer("json")
          self._state = serializer.load(state_file)
          logger.debug("Loaded state: %s", self._state)
  
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 
lib/gui/analysis/stats.py