From 3f9095097cccaeff0dc3455a789011a9265d7782 Mon Sep 17 00:00:00 2001 From: Sadra Barikbin Date: Tue, 9 Jul 2024 15:12:50 +0330 Subject: [PATCH] Fix a few typos in `metrics.py` (#218) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --------- Co-authored-by: Nathan Habib <30601243+NathanHB@users.noreply.github.com> Co-authored-by: Clémentine Fourrier <22726840+clefourrier@users.noreply.github.com> --- src/lighteval/metrics/metrics.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lighteval/metrics/metrics.py b/src/lighteval/metrics/metrics.py index 262b20a09..3c83625cb 100644 --- a/src/lighteval/metrics/metrics.py +++ b/src/lighteval/metrics/metrics.py @@ -301,7 +301,7 @@ class Metrics(Enum): sample_level_fn=LoglikelihoodPreparator().prepare, category=MetricCategory.MULTICHOICE, use_case=MetricUseCase.ACCURACY, - corpus_level_fn=CorpusLevelF1Score(None), + corpus_level_fn=CorpusLevelF1Score(None).compute, higher_is_better=True, ) loglikelihood_f1_single_token = CorpusLevelMetric( @@ -309,7 +309,7 @@ class Metrics(Enum): sample_level_fn=LoglikelihoodPreparator(is_single_token=True).prepare, category=MetricCategory.MULTICHOICE_ONE_TOKEN, use_case=MetricUseCase.ACCURACY, - corpus_level_fn=CorpusLevelF1Score(None), + corpus_level_fn=CorpusLevelF1Score(None).compute, higher_is_better=True, ) mcc = CorpusLevelMetric( @@ -385,7 +385,7 @@ class Metrics(Enum): sample_level_fn=LoglikelihoodPreparator(is_single_token=True).prepare, category=MetricCategory.MULTICHOICE_ONE_TOKEN, use_case=MetricUseCase.ACCURACY, - corpus_level_fn=CorpusLevelF1Score(average=None, num_classes=3), + corpus_level_fn=CorpusLevelF1Score(average=None, num_classes=3).compute, higher_is_better=True, ) perfect_exact_match = SampleLevelMetric(