"example/vscode:/vscode.git/clone" did not exist on "1ffad4d498bb0e6749c2481cbeb6faa5c16870d1"
Commit c7508401 authored by haileyschoelkopf's avatar haileyschoelkopf
Browse files

list out answer choices

parent 5a75f82a
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