Unverified Commit 80b429aa authored by farzanehnakhaee70's avatar farzanehnakhaee70 Committed by GitHub
Browse files

Merge pull request #1 from EleutherAI/qa4mre

List out answer choices in QA4MRE
parents 5a75f82a c7508401
def qa4mre_process(doc): def qa4mre_process(doc):
return int(doc["correct_answer_id"]) - 1 return int(doc["correct_answer_id"]) - 1
def doc_to_target(doc):
return doc["answer_options"]["answer_str"][qa4mre_process(doc)]
...@@ -6,8 +6,9 @@ dataset_name: 2011.main.EN ...@@ -6,8 +6,9 @@ dataset_name: 2011.main.EN
output_type: multiple_choice output_type: multiple_choice
test_split: train test_split: train
template_aliases: "{% set answer_choices = answer_options['answer_str'] %}" template_aliases: "{% set answer_choices = answer_options['answer_str'] %}"
doc_to_text: "{{document_str.strip()}}\nQuestion: {{question_str}}\nAnswer:" doc_to_text: "{{document_str.strip()}}\nQuestion: {{question_str}}\nChoices:\n- {{answer_choices|join('\n- ')}}\nAnswer:"
doc_to_target: !function preprocess_qa4mre.qa4mre_process doc_to_target: !function preprocess_qa4mre.doc_to_target
gold_alias: !function preprocess_qa4mre.qa4mre_process
should_decontaminate: true should_decontaminate: true
doc_to_decontamination_query: "{{document_str.strip()}} + ' ' + {{question_str}}" doc_to_decontamination_query: "{{document_str.strip()}} + ' ' + {{question_str}}"
metric_list: metric_list:
......
...@@ -6,8 +6,9 @@ dataset_name: 2012.main.EN ...@@ -6,8 +6,9 @@ dataset_name: 2012.main.EN
output_type: multiple_choice output_type: multiple_choice
test_split: train test_split: train
template_aliases: "{% set answer_choices = answer_options['answer_str'] %}" template_aliases: "{% set answer_choices = answer_options['answer_str'] %}"
doc_to_text: "{{document_str.strip()}}\nQuestion: {{question_str}}\nAnswer:" doc_to_text: "{{document_str.strip()}}\nQuestion: {{question_str}}\nChoices:\n- {{answer_choices|join('\n- ')}}\nAnswer:"
doc_to_target: !function preprocess_qa4mre.qa4mre_process doc_to_target: !function preprocess_qa4mre.doc_to_target
gold_alias: !function preprocess_qa4mre.qa4mre_process
should_decontaminate: true should_decontaminate: true
doc_to_decontamination_query: "{{document_str.strip()}} + ' ' + {{question_str}}" doc_to_decontamination_query: "{{document_str.strip()}} + ' ' + {{question_str}}"
metric_list: metric_list:
......
...@@ -6,8 +6,9 @@ dataset_name: 2013.main.EN ...@@ -6,8 +6,9 @@ dataset_name: 2013.main.EN
output_type: multiple_choice output_type: multiple_choice
test_split: train test_split: train
template_aliases: "{% set answer_choices = answer_options['answer_str'] %}" template_aliases: "{% set answer_choices = answer_options['answer_str'] %}"
doc_to_text: "{{document_str.strip()}}\nQuestion: {{question_str}}\nAnswer:" doc_to_text: "{{document_str.strip()}}\nQuestion: {{question_str}}\nChoices:\n- {{answer_choices|join('\n- ')}}\nAnswer:"
doc_to_target: !function preprocess_qa4mre.qa4mre_process doc_to_target: !function preprocess_qa4mre.doc_to_target
gold_alias: !function preprocess_qa4mre.qa4mre_process
should_decontaminate: true should_decontaminate: true
doc_to_decontamination_query: "{{document_str.strip()}} + ' ' + {{question_str}}" doc_to_decontamination_query: "{{document_str.strip()}} + ' ' + {{question_str}}"
metric_list: metric_list:
......
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