Commit 42df113c authored by Leo Gao's avatar Leo Gao
Browse files

Fix arithmetic

parent 84f14daf
......@@ -56,7 +56,10 @@ class Arithmetic(Task):
return doc.completion
def load_doc(self, doc_json):
return ArithmeticDoc(context=doc_json['context'].strip(), completion=doc_json['completion'].strip())
return ArithmeticDoc(context=doc_json['context'].strip()
.replace('\n\n', '\n')
.replace('Q:', 'Question:')
.replace('A:', 'Answer:'), completion=doc_json['completion'])
def construct_requests(self, doc, ctx):
ll, is_prediction = rf.loglikelihood(ctx, doc.completion)
......
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