MCPcopy Create free account
hub / github.com/OpenBitSys/BitDistiller / process_results

Method process_results

test/general/lm_eval/tasks/cbt.py:113–125  ·  view source on GitHub ↗

Take a single document and the LM results and evaluates, returning a dict where keys are the names of submetrics and values are the values of the metric for that one document :param doc: The document as returned from training_docs, validation_docs, or test_docs.

(self, doc, results)

Source from the content-addressed store, hash-verified

111 return lls
112
113 def process_results(self, doc, results):
114 """Take a single document and the LM results and evaluates, returning a
115 dict where keys are the names of submetrics and values are the values of
116 the metric for that one document
117
118 :param doc:
119 The document as returned from training_docs, validation_docs, or test_docs.
120 :param results:
121 The results of the requests created in construct_requests.
122 """
123 gold = doc["options"].index(doc["answer"])
124 pred = np.argmax(results)
125 return {"acc": pred == gold}
126
127 def aggregation(self):
128 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected