                                                                   and is_exit)
          self._plugin.model.save(self._filename, include_optimizer=include_optimizer)
          self._plugin.state.save()
  
          msg = "[Saved models]"
          if save_averages:
              lossmsg = [f"face_{side}: {avg:.5f}"
                         for side, avg in zip(("a", "b"), save_averages)]
              msg += f" - Average loss since last save: {', '.join(lossmsg)}"
          logger.info(msg)
 
</s> remove         include_optimizer = self._save_optimizer == "always" or (self._save_optimizer == "exit"
                                                                 and is_exit)
 </s> add         include_optimizer = (force_save_optimizer or
                             self._save_optimizer == "always" or
                             (self._save_optimizer == "exit" and is_exit))
 </s> remove             ``True`` if the save request has come from an exit process request otherwise ``False``
 </s> add             ``True`` if the save request has come from an exit process request otherwise ``False``. </s> remove     def save(self, is_exit: bool = False) -> None:
 </s> add     def save(self, is_exit: bool = False, force_save_optimizer: bool = False) -> None:
        msg = "[Saved optimizer state for Snapshot]" if force_save_optimizer else "[Saved models]"
                                                                   and is_exit)
          self._plugin.model.save(self._filename, include_optimizer=include_optimizer)
          self._plugin.state.save()
  
        msg = "[Saved optimizer state for Snapshot]" if force_save_optimizer else "[Saved models]"
          if save_averages:
              lossmsg = [f"face_{side}: {avg:.5f}"
                         for side, avg in zip(("a", "b"), save_averages)]
              msg += f" - Average loss since last save: {', '.join(lossmsg)}"
          logger.info(msg)
keep keep keep keep replace keep keep keep keep keep
 Force saving optimizer weights on snapshot 
plugins/train/model/_base/io.py