Open 1nuno opened 6 days ago
Hi @1nuno,
Not sure what is going wrong here, but if you want to use small-text only for text classification, you don't need a PoolBasedActiveLearner
.
Hugging Face Trainer I am not that firm with the Hugging Face APIs, but it looks like you are "cheating" on the Hugging Face Side by using the test dataset as a validation dataset:
trainer = Trainer(..., eval_dataset=test_dataset, ....)
It would be interesting here to see the performance on the test set at the same time.
small-text If the error is on the small-text side, I would guess it could be the model selection that messes things up. Try to work with the classifier directly and disable the model selection:
clf.fit(train_set, model_selection='none')
You are right that the resulting performances here should be similar. I have done this with BERT models and common benchmarks datasets in the past, so it should generally be possible.
Down below a show a relevant part of a simple notebook I have to fine-tune a BERT model using the transformers library:
If I then run the following code:
I get:
So far so good. My question arises when I try to do a similar training but this time using small-text library:
The results I get in this case are:
My question is: "Why are the results so different?". It went from .85 accuracy to .66. What am I missing? I figured since the small-text library uses transformer underneath it would give a similar result. I did my best to keep the hyper parameters the same as well.