o
    6ti                  
   @   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d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dd
d
d
d
dd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d
d%d%d
d-Z	ee	d.Z
d/d0 Zed1krue Zejejd2 Zeejd3d4ZeeZW d   n1 sw   Y  g Ze
 D ]f\ZZee D ][\ZZeevree ed5e d6d5e d6 gd5e ed7d8ed9Zejd7e d: Z e!d;e d<e   ee d=d3d4Z"ej#ee"d>d?d@ W d   n	1 s3w   Y  qqdAdB eD Z$ejd: Z e!dCe   ee d=d3d4Z"ej#dDe$dEe"dFdGdH W d   dS 1 snw   Y  dS dS )Iz>
Take in a YAML, and output all "other" splits with this YAML
    N)tqdmzlm-evalglobal_factsotherhigh_school_european_history
humanitieshigh_school_geographysocial_sciences#high_school_government_and_politicshigh_school_psychologyhigh_school_statisticsstemhigh_school_world_historyhuman_aginginternational_lawjurisprudencelogical_fallacies
management	marketingmoral_disputesmoral_scenarios	nutrition
philosophy)professional_lawprofessional_psychologypublic_relationssecurity_studies	sociologyworld_religionsislamic_studiesdriving_testnatural_sciencehistorygeneral_knowledgelawphysicssocial_sciencemanagement_ararabic_languagelanguagepolitical_sciencephilosophy_ar
accountingcomputer_science	geographymathbiology)	economicszarabic_language_(general)zarabic_language_(grammar)civics)mmluar_mmluc                  C   s,   t  } | jddd | jddd |  S )Nz--base_yaml_path!_default_darijammlu_template_yaml)defaultz--save_prefix_path
darijammlu)argparseArgumentParseradd_argument
parse_args)parser r<   ^/home/ubuntu/.local/lib/python3.10/site-packages/lm_eval/tasks/darijammlu/_generate_configs.pyr:   I   s   r:   __main__zutf-8)encodingdarijammlu__tasks_ )includetagtask
task_aliasdataset_namez.yamlzSaving yaml for subset z to wT")allow_unicodedefault_stylec                 C   s   g | ]}d | qS )rA   r<   ).0categoryr<   r<   r=   
<listcomp>s   s    rP   zSaving benchmark config to r6   )grouprG      F)indentdefault_flow_style)%__doc__r7   loggingosyamlr   	getLoggereval_loggerMMLU_SUBJECTSARABIC_MMLU_SUBJECTSDATASETSr:   __name__argspathsplitbase_yaml_pathbase_yaml_nameopenf	full_load	base_yamlALL_CATEGORIESitemsdatasetSUBJECTSsubjectrO   appendreplace	yaml_dictsave_prefix_pathfile_save_pathinfo	yaml_filedumpdarijammlu_subcategoriesr<   r<   r<   r=   <module>   s   
	
	






$