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 718bb06 commit 5716f95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sentence_transformers/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,8 @@ 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].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.")
elif len(self.model[0].auto_model.active_adapters()):
logger.info("Could not load best model, as the model has at least one adapter set. Please wait for an update of the transformers library to enable this feature.")
return

try:
Expand Down

0 comments on commit 5716f95

Please # to comment.