Skip to content

Commit

Permalink
Update eval_gauntlet_callback.py with math.log2 (#821)
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.

Co-authored-by: Daniel King <[email protected]>
  • Loading branch information
Skylion007 and dakinggg authored Feb 2, 2024
1 parent 86b5a98 commit d9874d2
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 d9874d2

Please sign in to comment.