From bfd38ac09cf4f0acb7ffc90224c3ca36443128bd Mon Sep 17 00:00:00 2001 From: Aoi <82735346+ryan-minato@users.noreply.github.com> Date: Fri, 20 Dec 2024 19:10:12 +0900 Subject: [PATCH] fix: scorer attribute initialization in ROUGE --- src/lighteval/metrics/metrics_sample.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lighteval/metrics/metrics_sample.py b/src/lighteval/metrics/metrics_sample.py index 2081b5606..fb0dca4fd 100644 --- a/src/lighteval/metrics/metrics_sample.py +++ b/src/lighteval/metrics/metrics_sample.py @@ -481,6 +481,7 @@ def __init__( self.normalize_gold = normalize_gold self.normalize_pred = normalize_pred self.tokenizer = tokenizer + self.scorer = None def compute(self, golds: list[str], predictions: list[str], **kwargs) -> float | dict: """Computes the metric(s) over a list of golds and predictions for one single sample.