Skip to content

Commit

Permalink
Update eval_gauntlet_callback.py with math.log2
Browse files Browse the repository at this point in the history
Saw an automated ruff flag this, seems like a strict improvement and is marginally faster.
  • Loading branch information
Skylion007 authored Dec 26, 2023
1 parent 836ab95 commit 91ee51a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions llmfoundry/callbacks/eval_gauntlet_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ def __init__(self,
elif self.weighting == Weighting.SAMPLE_SZ:
weight = cumulative_samples
elif self.weighting == Weighting.LOG_SAMPLE_SZ:
weight = max(math.log(cumulative_samples, 2), 1)

weight = max(math.log2(cumulative_samples), 1)
assert weight is not None
benchmark['weighting'] = weight

Expand Down

0 comments on commit 91ee51a

Please sign in to comment.