"src/include/blockwise_4d_tensor_op.cuh" did not exist on "1812666a473f00b333dca8aae5dafa64ccabaf7b"
Commit 82a538d3 authored by Leo Gao's avatar Leo Gao
Browse files

Make bootstrap test work

parent f9d87ad3
import pytest import pytest
import lm_eval.metrics as metrics import lm_eval.metrics as metrics
import random
def test_bootstrapping(): def test_bootstrapping():
arr = list(range(100)) random.seed(42)
arr = [random.random() for _ in range(100)]
expected = metrics.mean_stderr(arr) expected = metrics.mean_stderr(arr)
bootstrapped = metrics.bootstrap_stderr(metrics.mean, arr) bootstrapped = metrics.bootstrap_stderr(metrics.mean, arr, iters=100000)
assert bootstrapped == pytest.approx(expected) assert bootstrapped == pytest.approx(expected, abs=1e-4)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment