From 6fb54941965a2a021eb1fa4d8e2e41db2afbcebf Mon Sep 17 00:00:00 2001 From: Joel Niklaus Date: Mon, 11 Nov 2024 10:06:02 +0100 Subject: [PATCH] Fixes a TypeError for generative metrics. --- 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 ad709033..dc32d95c 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).