Skip to content

Commit 5137e03

Browse files
authored
Fix AvgAtK num_samples method (#987)
1 parent 3ec1992 commit 5137e03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lighteval/metrics/metrics_sample.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,9 +1208,9 @@ def num_samples(self):
12081208
"""Get the number of samples for this metric.
12091209
12101210
Returns:
1211-
int: The number of samples (n if specified, otherwise k)
1211+
int: The number of samples
12121212
"""
1213-
return self.n if self.n is not None else self.k
1213+
return self.k
12141214

12151215

12161216
class MajAtK(SamplingMetric, SampleLevelComputation):

0 commit comments

Comments
 (0)