Unverified Commit c3d941b9 authored by Leo Gao's avatar Leo Gao Committed by GitHub
Browse files

Merge pull request #254 from bigscience-workshop/thomas/fix_cb

Fix CB
parents 4849702e b421f052
......@@ -61,7 +61,7 @@ class BoolQ(HFTask):
class CommitmentBank(HFTask):
VERSION = 0
VERSION = 1
DATASET_PATH = "super_glue"
DATASET_NAME = "cb"
......@@ -84,14 +84,14 @@ class CommitmentBank(HFTask):
# True = entailment
# False = contradiction
# Neither = neutral
return " {}".format({0: "True", 1: "Neither", 2: "False"}[doc["label"]])
return " {}".format({0: "True", 1: "False", 2: "Neither"}[doc["label"]])
def construct_requests(self, doc, ctx):
ll_true, _ = rf.loglikelihood(ctx, ' True')
ll_neither, _ = rf.loglikelihood(ctx, ' Neither')
ll_false, _ = rf.loglikelihood(ctx, ' False')
ll_neither, _ = rf.loglikelihood(ctx, ' Neither')
return ll_true, ll_neither, ll_false
return ll_true, ll_false, ll_neither
def process_results(self, doc, results):
gold = doc["label"]
......
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