From 99ed6ed563c87c6104e6e284a8e89217956f5827 Mon Sep 17 00:00:00 2001 From: Joel Niklaus Date: Wed, 13 Nov 2024 09:49:44 -0800 Subject: [PATCH] Fixes a TypeError for generative metrics. (#386) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Clémentine Fourrier <22726840+clefourrier@users.noreply.github.com> --- src/lighteval/metrics/sample_preparator.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lighteval/metrics/sample_preparator.py b/src/lighteval/metrics/sample_preparator.py index ad709033a..dc32d95c0 100644 --- a/src/lighteval/metrics/sample_preparator.py +++ b/src/lighteval/metrics/sample_preparator.py @@ -55,6 +55,7 @@ class PerplexityCorpusMetricInput(CorpusMetricInput): class GenerativePreparator: + @staticmethod def prepare(golds: list[str], predictions: list[str], **kwargs): """Prepares an individual generative example to the format expected by metrics computed at the corpus level (aggregated).