Skip to content

Commit

Permalink
add none back
Browse files Browse the repository at this point in the history
  • Loading branch information
clefourrier committed Jan 26, 2024
1 parent ac5db4c commit c5df3eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lighteval/metrics/metrics_corpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ def __init__(self, average: str, num_classes: int = 2):
average (str): Method to use to compute the f1 score. Can be weighted, macro, micro.
num_classes (int, optional): Num of possible choice classes. Defaults to 2. If this parameter is above 2, we'll compute multi f1 corpus score
"""
if average not in ["weighted", "macro", "micro"]:
if average not in ["weighted", "macro", "micro", None]:
raise ValueError(
f"A CorpusLevelF1Score must be initialized with weighted, macro, micro as an average function. {average} was used."
f"A CorpusLevelF1Score must be initialized with weighted, macro, micro, or None as an average function. {average} was used."
)
self.average = average
self.num_classes = num_classes
Expand Down

0 comments on commit c5df3eb

Please sign in to comment.