Open l4b4r4b4b4 opened 4 months ago
Hello!
Apologies for the delay, I was on vacation last week.
This is indeed a new bug introduced in the v3 release when training CrossEncoder models with the SequentialEvaluator
. This class will now return a dictionary of results, whereas the CrossEncoder
fit method still expects a singular score. I think I might not fix this immediately, as I will indeed (as @ir2718 pointed out) refactor the CrossEncoder
training soon, after which all of the CE evaluators will also return dictionaries.
Has this bug been fixed? I still face the same problem in 3.1.1
hi, I am trying to replicate the Natural Language Inference (NLI) task example to train a cross-encoder on a 15 labels dataset.
When using the
distilroberta-base
I get the following error on training start:When using models from
bge-reranker-v2
family, the training starts successfully, but I get the following error on evaluation finish:This one seems to be because of the evaluator returning three different scores in the example resulting in a dictionary with three fields on
score
rather than an int. Looking into the code it seems this needsprimary_metric
to be set on the evluator, which it should actually do when looking into the code, but somehow it does not...I will do a hot fix in a custom CrossEncoder comparing to the SequentialScore defined in the NLI example as follows:
cross_encoder.py