You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
Training with hyperparameter_search, following the documentation here. I wish to save the best model. Could not apply the same functionality as in huggingface transformer -
# ... same exact code as in documantation
trainer.apply_hyperparameters(best_trial.hyperparameters, final_model=True) # replaces model_init with a fixed model
trainer.train()
I got this error -
trainer.apply_hyperparameters(best_trial.hyperparameters, final_model=True)
AttributeError: 'SentenceTransformerTrainer' object has no attribute 'apply_hyperparameters'
A workaround was to redefine a SentenceTransformerTrainingArguments with best_trial.hyperparameters dictionary values and a SentenceTransformertrainer and to train again.
Is it possible to add a functionality such as save_best() or to enable using trainer.apply_hyperparameters ?
Also, another useful functionality that may be nice to add is the same as hpo with a setFit transformer, it currently throws and error, and if exists would really appreciate if you could show me how to use it with sentence transformers. If already exists would appreciate some guidance.
from optuna.visualization.matplotlib import plot_param_importances
plot_param_importances(best_trial.backend);
Thank you for this wonderful library!
The text was updated successfully, but these errors were encountered:
Hi
Training with hyperparameter_search, following the documentation here. I wish to save the best model. Could not apply the same functionality as in huggingface transformer -
I got this error -
A workaround was to redefine a
SentenceTransformerTrainingArguments
withbest_trial.hyperparameters
dictionary values and aSentenceTransformertrainer
and to train again.Is it possible to add a functionality such as
save_best()
or to enable usingtrainer.apply_hyperparameters
?Also, another useful functionality that may be nice to add is the same as hpo with a setFit transformer, it currently throws and error, and if exists would really appreciate if you could show me how to use it with
sentence transformers
. If already exists would appreciate some guidance.Thank you for this wonderful library!
The text was updated successfully, but these errors were encountered: