          os.rename(self.model_dir, archive_dir)
          os.mkdir(self.model_dir)
          new_model = self.build_model(self._get_inputs())
          for model_name, layer_name in legacy_mapping.items():
              old_model: tf.keras.models.Model = load_model(os.path.join(archive_dir, model_name),
                                                            compile=False)
              layer = [layer for layer in new_model.layers if layer.name == layer_name]
              if not layer:
                  logger.warning("Skipping legacy weights from '%s'...", model_name)
                  continue
              klayer: tf.keras.layers.Layer = layer[0]
 
</s> remove         os.rename(self.model_dir, archive_dir)
        os.mkdir(self.model_dir)
 </s> add         os.rename(self.io.model_dir, archive_dir)
        os.mkdir(self.io.model_dir) </s> remove         filename = self._io._filename  # pylint:disable=protected-access
 </s> add         filename = self._io.filename </s> remove             retval = KModel(model_inputs, model, name=f"{saved_model.name}_inference")
 </s> add             retval = keras.models.Model(model_inputs, model, name=f"{saved_model.name}_inference") </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):
            old_model: tf.keras.models.Model = keras.models.load_model(
                os.path.join(archive_dir, model_name),
                compile=False)
          os.rename(self.model_dir, archive_dir)
          os.mkdir(self.model_dir)
          new_model = self.build_model(self._get_inputs())
          for model_name, layer_name in legacy_mapping.items():
            old_model: tf.keras.models.Model = keras.models.load_model(
                os.path.join(archive_dir, model_name),
                compile=False)
            old_model: tf.keras.models.Model = keras.models.load_model(
                os.path.join(archive_dir, model_name),
                compile=False)
              layer = [layer for layer in new_model.layers if layer.name == layer_name]
              if not layer:
                  logger.warning("Skipping legacy weights from '%s'...", model_name)
                  continue
              klayer: tf.keras.layers.Layer = layer[0]
keep keep keep keep replace 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/model.py