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

Method process_results

test/general/lm_eval/tasks/pawsx.py:112–130  ·  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

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected