huggingface / huggingface/setfit

Error with model.predict() when using early stopping

Open
#425 9 comments 0 reactions 0 assignees View on GitHub
needs verification
Dominant language
Jupyter Notebook
Stars
2.8k
Forks
267
Avg merge
36m
Merged PRs (30d)
5

Description

Hi, I trained my model using [this](https://github.com/huggingface/setfit/issues/424) and used early stopping criterian in setfit model. After training saved the model as : model.save_pretrained("setfit_early_stopping") and then I am trying to load the model and predict on my text, using below code:
model = SetFitModel.from_pretrained("setfit_early_stopping")
model.predict([text])
I am getting error of "This LogisticRegression instance is not fitted yet. Call 'fit' with appropriate arguments before using this estimator."

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.