Closed aaronbriel closed 10 months ago
Hello!
Thanks for raising this - I haven't seen this issue before. SetFit trains in 2 phases (docs), and the first phase (embedding finetuning) indeed succeeded as shown by your logs. The crash seems to occur when starting the second phase (classifier training).
The error is a bit surprising to me, I haven't seen this one before. My personal recommendation is to employ the Logistic Regression classification head instead of the differentiable classification head. I've generally had better performance, training speed & reliability with that head.
The only change you would have to make is to update the model initialisation to remove the use_differentiable_head
and head_params
parameters:
model = SetFitModel.from_pretrained('sentence-transformers/paraphrase-mpnet-base-v2')
Feel free to run this on a much truncated dataset (train_dataset=train_dataset.select(range(200))
) to relatively quickly get an idea of whether this does work as intended.
I retrained the model, removing the use_differentiable_head
and head_params
parameters and there were no errors. Thank you so much!
I ran into the following error, which presumably occurred at the end of training based on the logs, which seemed to indicate that training completed:
Here is the stack trace:
I have a clean dataset consisting of a csv with 30 classes and 50 samples per class. Here is how I configured it to be compatible for SetFit training:
Here is how I set up training, based on suggestions given by @tomaarsen here: