Skip to content

Commit c1ee2e9

Browse files
Skylion007dakinggg
authored andcommitted
Update eval_gauntlet_callback.py with math.log2 (#821)
Saw an automated ruff flag this, seems like a strict improvement and is marginally faster. Co-authored-by: Daniel King <[email protected]>
1 parent 89e7ebe commit c1ee2e9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llmfoundry/callbacks/eval_gauntlet_callback.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ def __init__(self,
117117
elif self.weighting == Weighting.SAMPLE_SZ:
118118
weight = cumulative_samples
119119
elif self.weighting == Weighting.LOG_SAMPLE_SZ:
120-
weight = max(math.log(cumulative_samples, 2), 1)
121-
120+
weight = max(math.log2(cumulative_samples), 1)
122121
assert weight is not None
123122
benchmark['weighting'] = weight
124123

0 commit comments

Comments
 (0)