                               self._save_optimizer == "always" or
                               (self._save_optimizer == "exit" and is_exit))
  
          try:
              self._plugin.model.save(self._filename, include_optimizer=include_optimizer)
          except ValueError as err:
              if include_optimizer and "name already exists" in str(err):
                  logger.warning("Due to a bug in older versions of Tensorflow, optimizer state "
                                 "cannot be saved for this model.")
                  self._plugin.model.save(self._filename, include_optimizer=False)
 
</s> remove                 self._plugin.model.save(self._filename, include_optimizer=False)
 </s> add                 self._plugin.model.save(self.filename, include_optimizer=False) </s> remove             self._backup.backup_model(self._filename)
            # pylint:disable=protected-access
            self._backup.backup_model(self._plugin.state._filename)
 </s> add             self._backup.backup_model(self.filename)
            self._backup.backup_model(self._plugin.state.filename) </s> remove                 model.save(is_exit=True)
 </s> add                 model.io.save(is_exit=True) </s> remove             model = kmodels.load_model(self._filename, compile=False)
 </s> add             model = kmodels.load_model(self.filename, compile=False) </s> remove                 if self._command == "train" and output.startswith("Reading training images"):
                    print(output.strip(), file=sys.stdout)
 </s> add                 if self._process_training_determinate_function(output):
            self._plugin.model.save(self.filename, include_optimizer=include_optimizer)
                               self._save_optimizer == "always" or
                               (self._save_optimizer == "exit" and is_exit))
  
          try:
            self._plugin.model.save(self.filename, include_optimizer=include_optimizer)
          except ValueError as err:
              if include_optimizer and "name already exists" in str(err):
                  logger.warning("Due to a bug in older versions of Tensorflow, optimizer state "
                                 "cannot be saved for this model.")
                  self._plugin.model.save(self._filename, include_optimizer=False)
keep keep keep keep replace keep keep keep keep keep
 Learning Rate finder (#1341)

* Add LR Finder support structure

* Move trainer.Feeder to lib.training.generator

* Expose model.io

* Add lr_finder

* Update docs and locales

* Pre-PR fixups
  - Fix training graph not displaying
  - CI fixes
  - Switch lr finder progress to tqdm
  - Exit lr finder early on NaN
  - Display lr finder progress in GUI 
plugins/train/model/_base/io.py