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

Method _process_doc

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

Override this to process (detokenize, strip, replace, etc.) individual documents. This can be used in a map over documents of a data split. E.g. `map(self._process_doc, self.dataset["validation"])` :return: dict The processed version of the specified `do

(self, doc)

Source from the content-addressed store, hash-verified

1002 )
1003
1004 def _process_doc(self, doc):
1005 """
1006 Override this to process (detokenize, strip, replace, etc.) individual
1007 documents. This can be used in a map over documents of a data split.
1008 E.g. `map(self._process_doc, self.dataset["validation"])`
1009
1010 :return: dict
1011 The processed version of the specified `doc`.
1012 """
1013 return doc
1014
1015 def doc_to_text(self, doc):
1016 if self.prompt is not None:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected