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

Method fewshot_docs

lm-eval-harness/lm_eval/api/task.py:297–311  ·  view source on GitHub ↗

:return: Iterable[obj] A iterable of any object, that doc_to_text can handle

(self)

Source from the content-addressed store, hash-verified

295 return []
296
297 def fewshot_docs(self):
298 """
299 :return: Iterable[obj]
300 A iterable of any object, that doc_to_text can handle
301 """
302 if self.has_training_docs():
303 return self.training_docs()
304 elif self.has_validation_docs():
305 return self.validation_docs()
306 else:
307 eval_logger.warning(
308 f"[Task: {self.config.task}] has_training_docs and has_validation_docs are False"
309 ", using test_docs as fewshot_docs but this is not recommended."
310 )
311 return self.test_docs()
312
313 def _process_doc(self, doc):
314 """

Callers 1

fewshot_docsMethod · 0.45

Calls 5

has_training_docsMethod · 0.95
training_docsMethod · 0.95
has_validation_docsMethod · 0.95
validation_docsMethod · 0.95
test_docsMethod · 0.95

Tested by

no test coverage detected