diff --git a/parlai/tasks/squad2/agents.py b/parlai/tasks/squad2/agents.py index c911ab41091..f69a3108f55 100644 --- a/parlai/tasks/squad2/agents.py +++ b/parlai/tasks/squad2/agents.py @@ -114,7 +114,7 @@ def setup_data(self, path): ans_list = [{"text": ""}] if not qa['is_impossible']: ans_list = qa['answers'] - answers = (a['text'] for a in ans_list) + answers = tuple(a['text'] for a in ans_list) context = paragraph['context'] yield (context + '\n' + question, answers), True