Commit 2522c27f authored by Ben Wang's avatar Ben Wang
Browse files

also apply normalization to piqa

parent 3eaa493e
......@@ -34,8 +34,11 @@ class PiQA(HFTask):
return ll_1, ll_2
def process_results(self, doc, results):
completion_len = np.array([float(len(doc["sol1"])), float(len(doc["sol2"]))])
return {
'acc': np.argmax(results) == doc["label"]
'acc': np.argmax(results) == doc["label"],
'acc_norm': np.argmax(results / completion_len) == doc["label"]
}
def aggregation(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment