-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SentenceTransformerTrainer compute_metrics #2888
Comments
Hi, I think this is the expected behaviour. but I'm not 100% sure. The Besides, there is no obvious way to define false positives and false negatives with triplet information. The only thing you can say when you've got triplet data is whether a positive is closer to the anchor than the negative, hence accuracy is only calculated. |
There's no information about this expected behavior or not. Maybe printing warning if the function is passed will be good. |
+1 |
Hello! The This happens during every evaluation, but Sentence Transformer models don't usually train with single inputs & single outputs, so the sentence-transformers/sentence_transformers/trainer.py Lines 345 to 351 in 1802076
As a result, the In Sentence Transformers, if you want to compute evaluations, it is recommended to use one of the Evaluators. There's some more information about them here. If you want to create your own evaluator, you can subclass the SentenceEvaluator class. You can pass an evaluator to the STTrainer, or even a list if you have multiple.
|
Thank you very much! Maybe add a warning about this? Because this is a bit unexpected behavior |
Hi! I tried to train my model and evaluate it using
compute_metrics
, but I didn't get any metrics. Is this a bug, or is it not supposed to work?Code for test:
https://colab.research.google.com/drive/11sml4nfhkVVoZy0fTsll6BLgpHYz-BWD
The text was updated successfully, but these errors were encountered: