Commit 2f5f42c6 authored by Leo Gao's avatar Leo Gao
Browse files

Add MultipleChoiceTest target

parent 7422d593
...@@ -181,6 +181,9 @@ class Task(abc.ABC): ...@@ -181,6 +181,9 @@ class Task(abc.ABC):
class MultipleChoiceTask(Task): class MultipleChoiceTask(Task):
def doc_to_target(self, doc):
return " " + doc['choices'][doc['gold']]
def construct_requests(self, doc, ctx): def construct_requests(self, doc, ctx):
lls = [ lls = [
rf.loglikelihood(ctx, " {}".format(choice))[0] rf.loglikelihood(ctx, " {}".format(choice))[0]
......
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