o
    6ti9                  	   @   s  d Z ddlZddlZddlZddlZddlmZ eeZi dddddd	d
dddddddddddddddddddddd d!d"d#d$d%i d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGi dHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdii djdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dddddddddddZ	dd Z
edkre
 Zejejd ZeejddZeeZW d   n	1 sw   Y  ejdurGddlZeejddZeeZW d   n	1 sBw   Y  ee	 D ]g\ZZejdur\ee Znde dZeejdkrrdej de nde eedZejde d Ze de de  eedddZ!ej"ee!e#dddd W d   n	1 sw   Y  qMddd e	$ D ddddddddgddidZ%dej d ZeedddZ&ej"e%e&e#dddd W d   dS 1 sw   Y  dS dS )z<
Take in a YAML, and output all other splits with this YAML
    N)tqdmagronomyu   农学anatomyu	   解剖学ancient_chineseu	   古汉语artsu	   艺术学	astronomyu	   天文学business_ethicsu   商业伦理chinese_civil_service_examu   中国公务员考试chinese_driving_ruleu   中国驾驶规则chinese_food_cultureu   中国饮食文化chinese_foreign_policyu   中国外交政策chinese_historyu   中国历史chinese_literatureu   中国文学chinese_teacher_qualificationu   中国教师资格clinical_knowledgeu   临床知识college_actuarial_scienceu   大学精算学college_educationu   大学教育学college_engineering_hydrologyu   大学工程水文学college_lawu   大学法律college_mathematicsu   大学数学college_medical_statisticsu   大学医学统计college_medicineu   大学医学computer_scienceu   计算机科学computer_securityu   计算机安全conceptual_physicsu   概念物理学construction_project_managementu   建设工程管理	economicsu	   经济学	educationu	   教育学electrical_engineeringu   电气工程elementary_chineseu   小学语文elementary_commonsenseu   小学常识%elementary_information_and_technologyu   小学信息技术elementary_mathematicsu   初等数学	ethnologyu	   民族学food_scienceu   食品科学geneticsu	   遗传学global_factsu   全球事实high_school_biologyu   高中生物high_school_chemistryu   高中化学high_school_geographyu   高中地理high_school_mathematicsu   高中数学high_school_physicsu   高中物理学high_school_politicsu   高中政治human_sexualityu   人类性行为international_lawu   国际法学
journalismu	   新闻学jurisprudenceu	   法理学legal_and_moral_basisu   法律与道德基础logicalu	   逻辑学machine_learningu   机器学习
managementu	   管理学	marketingu   市场营销marxist_theoryu   马克思主义理论modern_chineseu   现代汉语	nutritionu	   营养学
philosophyu   哲学professional_accountingu   专业会计professional_lawu   专业法学professional_medicineu   专业医学professional_psychologyu   专业心理学public_relationsu   公共关系security_studyu   安全研究	sociologyu	   社会学sports_scienceu	   体育学traditional_chinese_medicineu   中医中药virologyu	   病毒学world_historyu   世界历史world_religionsu   世界宗教c                  C   sH   t  } | jddd | jddd | jdd d | jdd	d |  S )
Nz--base_yaml_pathT)requiredz--save_prefix_pathcmmlu)defaultz--cot_prompt_pathz--task_prefix )argparseArgumentParseradd_argument
parse_args)parser rO   Y/home/ubuntu/.local/lib/python3.10/site-packages/lm_eval/tasks/cmmlu/_generate_configs.pyrM   W   s   rM   __main__zutf-8)encodingu   以下是关于u>   的单项选择题，请直接给出正确答案的选项。

rI   cmmlu__)includetaskdataset_namedescriptionz.yamlzSaving yaml for subset z to winfT")widthallow_unicodedefault_stylerG   c                 C   s2   g | ]}t jd krdt j d| nd| qS )rI   rT   rU   )argstask_prefix).0subject_engrO   rO   rP   
<listcomp>   s    
rd   accmean)metricaggregationweight_by_sizeacc_normversiong        )grouprW   aggregate_metric_listmetadata)'__doc__rJ   loggingosyamlr   	getLogger__name__eval_loggerSUBJECTSrM   r`   pathsplitbase_yaml_pathbase_yaml_nameopenf	full_load	base_yamlcot_prompt_pathjsonloadcot_fileitemsrc   
subject_zhrY   ra   	yaml_dictsave_prefix_pathfile_save_pathinfo	yaml_filedumpfloatkeysgroup_yaml_dictgroup_yaml_filerO   rO   rO   rP   <module>   s   
	
 !"#$%&'()*+,-./0123456789:;<=>?@ABCG
	

	
	
$