From cfb25c9cf75abb6183509c09e622fbade7abcc4f Mon Sep 17 00:00:00 2001 From: Julian Risch Date: Fri, 21 May 2021 14:44:06 +0200 Subject: [PATCH] Add metric to TextPairClassificationProcessor without setting a metric, the TextPairClassificationProcessor cannot be initialized and the following message is shown: "Initialized processor without tasks. Supply `metric` and `label_list` to the constructor for using the default task or add a custom task later via processor.add_task()" https://github.com/deepset-ai/FARM/blob/751b48f0310e11c0e4cbdb95f264e47a587d86e1/farm/data_handler/processor.py#L587 --- examples/passage_ranking.py | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/passage_ranking.py b/examples/passage_ranking.py index da119a546..3fcf9b0ce 100644 --- a/examples/passage_ranking.py +++ b/examples/passage_ranking.py @@ -69,6 +69,7 @@ def text_pair_classification(): # We will be using the msmarco dev set as our final evaluation set processor = TextPairClassificationProcessor(tokenizer=tokenizer, label_list=label_list, + metric="f1_macro", train_filename=train_filename, test_filename=None, dev_split=0.001,