thunlp / OpenPrompt

An Open-Source Framework for Prompt-Learning.
https://thunlp.github.io/OpenPrompt/
Apache License 2.0
4.38k stars 455 forks source link

Classification Matrix using Trainer Object #272

Closed MosheAbG closed 1 year ago

MosheAbG commented 1 year ago

Hello

I am using the trainer object and have been unable to produce a classification matrix for my validation or test results.

The test and inference epoch functions give one value for the total macro f1 score, but I was unable to have returned the macro precision and recall as well.

Is there an option to have just the labels and predictions returned that way I can just compute the required metrics. In the hugging face trainer, there is a predict function that does that, does the openprompt trainer have anything similar.