Skip to content

Commit

Permalink
Update trainer.py
Browse files Browse the repository at this point in the history
  • Loading branch information
GTimothee authored Nov 14, 2024
1 parent 0a4c2d5 commit 718bb06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sentence_transformers/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ def _load_best_model(self) -> None:
if not isinstance(self.model[0], Transformer):
logger.info("Could not load best model, as the model is not a `transformers`-based model.")
return
elif isinstance(self.model[0], PeftAdapterMixin):
elif isinstance(self.model[0].auto_model, PeftAdapterMixin):
logger.info("Could not load best model, as the model is a `PeftAdapterMixin`-based model. Please wait for an update of the transformers library to enable this feature.")
return

Expand Down

0 comments on commit 718bb06

Please sign in to comment.