Skip to content

Commit

Permalink
fix: scorer attribute initialization in ROUGE (huggingface#471)
Browse files Browse the repository at this point in the history
Co-authored-by: Clémentine Fourrier <[email protected]>
  • Loading branch information
ryan-minato and clefourrier authored Dec 26, 2024
1 parent 9ff194d commit 2ef9740
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lighteval/metrics/metrics_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 2ef9740

Please sign in to comment.