Commit 60c9c170 authored by haileyschoelkopf's avatar haileyschoelkopf
Browse files

Merge branch 'main' into inverse-scaling-tasks

parents 4b2d565b b4cd85d4
"dataset_name": "physics"
"description": "以下為物理的單選題,請提供正確答案的選項。\n\n"
"group": "tmmluplus_STEM"
"group_alias": "STEM"
"include": "_default_template_yaml"
"task": "tmmluplus_physics"
"task_alias": "physics"
"dataset_name": "politic_science"
"description": "以下為政治的單選題,請提供正確答案的選項。\n\n"
"group": "tmmluplus_social_sciences"
"group_alias": "social sciences"
"include": "_default_template_yaml"
"task": "tmmluplus_politic_science"
"task_alias": "politic science"
"dataset_name": "real_estate"
"description": "以下為房地產的單選題,請提供正確答案的選項。\n\n"
"group": "tmmluplus_other"
"group_alias": "other"
"include": "_default_template_yaml"
"task": "tmmluplus_real_estate"
"task_alias": "real estate"
"dataset_name": "secondary_physics"
"description": "以下為高中物理的單選題,請提供正確答案的選項。\n\n"
"group": "tmmluplus_STEM"
"group_alias": "STEM"
"include": "_default_template_yaml"
"task": "tmmluplus_secondary_physics"
"task_alias": "secondary physics"
"dataset_name": "statistics_and_machine_learning"
"description": "以下為統計與機器學習的單選題,請提供正確答案的選項。\n\n"
"group": "tmmluplus_STEM"
"group_alias": "STEM"
"include": "_default_template_yaml"
"task": "tmmluplus_statistics_and_machine_learning"
"task_alias": "statistics and machine learning"
"dataset_name": "taiwanese_hokkien"
"description": "以下為閩南語的單選題,請提供正確答案的選項。\n\n"
"group": "tmmluplus_social_sciences"
"group_alias": "social sciences"
"include": "_default_template_yaml"
"task": "tmmluplus_taiwanese_hokkien"
"task_alias": "taiwanese hokkien"
"dataset_name": "taxation"
"description": "以下為稅務的單選題,請提供正確答案的選項。\n\n"
"group": "tmmluplus_humanities"
"group_alias": "humanities"
"include": "_default_template_yaml"
"task": "tmmluplus_taxation"
"task_alias": "taxation"
"dataset_name": "technical"
"description": "以下為技術工相關的單選題,請提供正確答案的選項。\n\n"
"group": "tmmluplus_other"
"group_alias": "other"
"include": "_default_template_yaml"
"task": "tmmluplus_technical"
"task_alias": "technical"
"dataset_name": "three_principles_of_people"
"description": "以下為三民主義的單選題,請提供正確答案的選項。\n\n"
"group": "tmmluplus_social_sciences"
"group_alias": "social sciences"
"include": "_default_template_yaml"
"task": "tmmluplus_three_principles_of_people"
"task_alias": "three principles of people"
"dataset_name": "trade"
"description": "以下為貿易的單選題,請提供正確答案的選項。\n\n"
"group": "tmmluplus_other"
"group_alias": "other"
"include": "_default_template_yaml"
"task": "tmmluplus_trade"
"task_alias": "trade"
"dataset_name": "traditional_chinese_medicine_clinical_medicine"
"description": "以下為中醫臨床醫學的單選題,請提供正確答案的選項。\n\n"
"group": "tmmluplus_other"
"group_alias": "other"
"include": "_default_template_yaml"
"task": "tmmluplus_traditional_chinese_medicine_clinical_medicine"
"task_alias": "traditional chinese medicine clinical medicine"
"dataset_name": "trust_practice"
"description": "以下為信託實務的單選題,請提供正確答案的選項。\n\n"
"group": "tmmluplus_humanities"
"group_alias": "humanities"
"include": "_default_template_yaml"
"task": "tmmluplus_trust_practice"
"task_alias": "trust practice"
"dataset_name": "ttqav2"
"description": "以下為台灣在地用語的單選題,請提供正確答案的選項。\n\n"
"group": "tmmluplus_social_sciences"
"group_alias": "social sciences"
"include": "_default_template_yaml"
"task": "tmmluplus_ttqav2"
"task_alias": "ttqav2"
"dataset_name": "tve_chinese_language"
"description": "以下為統測國文的單選題,請提供正確答案的選項。\n\n"
"group": "tmmluplus_social_sciences"
"group_alias": "social sciences"
"include": "_default_template_yaml"
"task": "tmmluplus_tve_chinese_language"
"task_alias": "tve chinese language"
"dataset_name": "tve_design"
"description": "以下為統測 設計的單選題,請提供正確答案的選項。\n\n"
"group": "tmmluplus_other"
"group_alias": "other"
"include": "_default_template_yaml"
"task": "tmmluplus_tve_design"
"task_alias": "tve design"
"dataset_name": "tve_mathematics"
"description": "以下為統測數學的單選題,請提供正確答案的選項。\n\n"
"group": "tmmluplus_STEM"
"group_alias": "STEM"
"include": "_default_template_yaml"
"task": "tmmluplus_tve_mathematics"
"task_alias": "tve mathematics"
"dataset_name": "tve_natural_sciences"
"description": "以下為統測自然科的單選題,請提供正確答案的選項。\n\n"
"group": "tmmluplus_STEM"
"group_alias": "STEM"
"include": "_default_template_yaml"
"task": "tmmluplus_tve_natural_sciences"
"task_alias": "tve natural sciences"
"dataset_name": "veterinary_pathology"
"description": "以下為獸醫病理學的單選題,請提供正確答案的選項。\n\n"
"group": "tmmluplus_other"
"group_alias": "other"
"include": "_default_template_yaml"
"task": "tmmluplus_veterinary_pathology"
"task_alias": "veterinary pathology"
"dataset_name": "veterinary_pharmacology"
"description": "以下為獸醫藥理學的單選題,請提供正確答案的選項。\n\n"
"group": "tmmluplus_other"
"group_alias": "other"
"include": "_default_template_yaml"
"task": "tmmluplus_veterinary_pharmacology"
"task_alias": "veterinary pharmacology"
import datasets
def process_docs(dataset: datasets.Dataset) -> datasets.Dataset:
def _helper(doc):
# modifies the contents of a single
# document in our dataset.
answer_list = ["A", "B", "C", "D"]
out_doc = {
"questions": doc["question"],
"choices": [doc["A"], doc["B"], doc["C"], doc["D"]],
"goal": answer_list.index(doc["answer"]),
}
return out_doc
return dataset.map(_helper) # returns back a datasets.Dataset object
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