              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
              layer = layer[0]
              logger.info("Updating legacy weights from '%s'...", model_name)
              layer.set_weights(old_model.get_weights())
          filename = self._io._filename  # pylint:disable=protected-access
          logger.info("Saving Tensorflow 2.x model to '%s'", filename)
          new_model.save(filename)
 
</s> remove             layer.set_weights(old_model.get_weights())
 </s> add             klayer.set_weights(old_model.get_weights()) </s> remove             old_model = load_model(os.path.join(archive_dir, model_name), compile=False)
 </s> add             old_model: keras.models.Model = load_model(os.path.join(archive_dir, model_name),
                                                       compile=False) </s> remove         for idx, model in enumerate(get_all_sub_models(self._model)):
 </s> add         for idx, model in enumerate(get_all_sub_models(self.model)): </s> remove     from tensorflow import pad
 </s> add     from tensorflow import pad  # type:ignore </s> remove                      self._model.output_names, new_names)
        self._model.output_names = new_names
 </s> add                      self.model.output_names, new_names)
        self.model.output_names = new_names
            klayer: keras.layers.Layer = layer[0]
              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: keras.layers.Layer = layer[0]
              logger.info("Updating legacy weights from '%s'...", model_name)
              layer.set_weights(old_model.get_weights())
          filename = self._io._filename  # pylint:disable=protected-access
          logger.info("Saving Tensorflow 2.x model to '%s'", filename)
          new_model.save(filename)
keep keep keep keep replace keep keep keep keep keep
 Core updates
   - Change loss loading mechanism
   - Autosize tooltips based on content size
   - Random linting + code modernisation 
plugins/train/model/_base/model.py