Commit 6a534600 authored by thefazzer's avatar thefazzer
Browse files

Merge remote-tracking branch 'origin/fazz/refactor-task-coqa' into fazz/refactor-task-coqa

parents fee14a6d f9750990
...@@ -51,7 +51,7 @@ class CoQA(Task): ...@@ -51,7 +51,7 @@ class CoQA(Task):
doc_text = doc["story"] + '\n\n' doc_text = doc["story"] + '\n\n'
for (q, a) in zip_longest(doc["questions"], doc["answers"][:-1]): # omit target answer ai for (q, a) in zip_longest(doc["questions"], doc["answers"][:-1]): # omit target answer ai
question = f"Q: {q['input_text']}" + '\n\n' question = f"Q: {q['input_text']}" + '\n\n'
answer = f"A: {a['input_text']}" + '\n\n' if a is not None else "A: " answer = f"A: {a['input_text']}" + '\n\n' if a is not None else "A:"
doc_text += question + answer doc_text += question + answer
print(doc_text) print(doc_text)
return doc_text return doc_text
......
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