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

Method sample

lm-eval-harness/lm_eval/api/samplers.py:66–71  ·  view source on GitHub ↗

Draw `n` samples from our fewshot docs. This method should be overridden by subclasses.

(self, n)

Source from the content-addressed store, hash-verified

64 return labeled_examples
65
66 def sample(self, n):
67 """
68 Draw `n` samples from our fewshot docs. This method should be overridden by subclasses.
69 """
70
71 return self.rnd.sample(self.docs, n)
72
73
74class FirstNSampler(ContextSampler):

Callers 1

get_contextMethod · 0.95

Calls 1

sampleMethod · 0.45

Tested by

no test coverage detected