Skip to content

Commit c5df3eb

Browse files
committed
add none back
1 parent ac5db4c commit c5df3eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lighteval/metrics/metrics_corpus.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ def __init__(self, average: str, num_classes: int = 2):
3939
average (str): Method to use to compute the f1 score. Can be weighted, macro, micro.
4040
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
4141
"""
42-
if average not in ["weighted", "macro", "micro"]:
42+
if average not in ["weighted", "macro", "micro", None]:
4343
raise ValueError(
44-
f"A CorpusLevelF1Score must be initialized with weighted, macro, micro as an average function. {average} was used."
44+
f"A CorpusLevelF1Score must be initialized with weighted, macro, micro, or None as an average function. {average} was used."
4545
)
4646
self.average = average
4747
self.num_classes = num_classes

0 commit comments

Comments
 (0)