Commit b1746639 authored by Baber's avatar Baber
Browse files

add mathvista_mcq

parent 25869601
include: mathvista.yaml
task: mathvista_mcq
output_type: "multiple_choice"
process_docs: !function utils.process_docs_mcq
doc_to_choice: '{{ ["A", "B", "C", "D", "E", "F"][:choices.length] }}'
doc_to_target: "{{choices.index(answer)}}"
metric_list:
- metric: acc
aggregation: mean
higher_is_better: true
- metric: acc_norm
aggregation: mean
higher_is_better: true
metadata:
version: 1.0
......@@ -143,3 +143,10 @@ def process_results(doc: dict, results: list[str]):
)
res = safe_equal(normalized_extraction, answer)
return {"acc": 1.0} if res else {"acc": 0.0}
### MathVista MCQ ###
def process_docs_mcq(dataset):
return dataset.filter(lambda x: x["question_type"] == "multi_choice")
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