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

Method fewshot_docs

lm-eval-harness/lm_eval/api/task.py:925–937  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

923 return self.dataset[self.config.test_split]
924
925 def fewshot_docs(self):
926 if self.config.fewshot_split is not None:
927 if self.config.process_docs is not None:
928 return self.config.process_docs(self.dataset[self.config.fewshot_split])
929 return self.dataset[self.config.fewshot_split]
930 else:
931 if (self.config.num_fewshot is not None) and (self.config.num_fewshot > 0):
932 eval_logger.warning(
933 f"Task '{self.config.task}': "
934 "num_fewshot > 0 but fewshot_split is None. "
935 "using preconfigured rule."
936 )
937 return super().fewshot_docs()
938
939 @utils.positional_deprecated
940 def fewshot_context(self, doc, num_fewshot):

Callers 1

__init__Method · 0.95

Calls 1

fewshot_docsMethod · 0.45

Tested by

no test coverage detected