o
    6ti
                     @   s<  d Z ddlZddlZddlZddlZddlZddlZddlmZ dd Ze	dkre Z
eje
jd Zee
jdd	ZeeZW d   n1 sLw   Y  d
ZedZdZeee D ]Zede djdZedd Zed^ZZ dZ!e
j"re
j#rd$e d Z!n6e D ]3Z%z	e&e%d Z'W n e(y Z) ze*de e*e% e)dZ)[)ww e%dd Z+e!e+ e' d7 Z!qe!e Z,e
j#re,d Z,ede
j- de eed e,dZ.e
j/de d Z0e*de de0  ee0ddd	Z1ej2e.e1e3dddd  W d   n	1 sw   Y  qcdS dS )!z<
Take in a YAML, and output all other splits with this YAML
    N)tqdmc                  C   sV   t  } | jddd | 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zeroshot)defaultz--cotFz	--fewshotz--task_prefix )argparseArgumentParseradd_argument
parse_args)parser r   W/home/ubuntu/.local/lib/python3.10/site-packages/lm_eval/tasks/bbh/_generate_configs.pyr
      s   r
   __main__zutf-8)encodingzQ: {{input}}
A:z(?<=answer is )(.*)(?=.)zlukaemon/bbhzNhttps://raw.githubusercontent.com/suzgunmirac/BIG-Bench-Hard/main/cot-prompts/z.txtz
-----
z

r   taskzLet's think step by step.z Let's think step by step.
bbh__)includer   dataset_namedescriptiondoc_to_text/z.yamlzSaving yaml for subset z to winfT")widthallow_unicodedefault_style)4__doc__r   osredatasetsrequestsyamlr   r
   __name__argspathsplitbase_yaml_pathbase_yaml_nameopenf	full_load	base_yamlbase_doc_to_textcompileanswer_regexdataset_pathget_dataset_infoskeysr   getcontentdecoderesppromptr   few_shotprefix_doc_to_textfewshotcotjoinshotsearchanswer	Exceptioneprintexampler   task_prefix	yaml_dictsave_prefix_pathfile_save_path	yaml_filedumpfloatr   r   r   r   <module>   s    




