MCPcopy Create free account
hub / github.com/OpenSparseLLMs/MoM / _bootstrap_internal

Class _bootstrap_internal

lm-eval-harness/lm_eval/api/metrics.py:368–380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

366
367
368class _bootstrap_internal:
369 def __init__(self, f, n) -> None:
370 self.f = f
371 self.n = n
372
373 def __call__(self, v):
374 i, xs = v
375 rnd = random.Random()
376 rnd.seed(i)
377 res = []
378 for _ in range(self.n):
379 res.append(self.f(rnd.choices(xs, k=len(xs))))
380 return res
381
382
383def bootstrap_stderr(f, xs, iters):

Callers 1

bootstrap_stderrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected