File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 1- from time import time
21from typing import List
32
43from inspect_ai import Task , task
@@ -69,7 +68,6 @@ def load_mgsm_dataset(
6968 languages = ALL_LANGUAGES
7069
7170 samples = []
72- seed = int (time ()) # use same shuffling seed for all languages
7371
7472 for lang in languages :
7573 csv_filename = LANG_TO_FPATH [lang ]
@@ -79,17 +77,14 @@ def load_mgsm_dataset(
7977 dialect = "excel-tab" ,
8078 limit = limit_samples_per_lang ,
8179 shuffle = shuffle ,
82- seed = seed ,
83- auto_id = True ,
8480 delimiter = "\t " ,
8581 )
8682
8783 lang_samples = lang_dataset .samples # type: ignore
88- cot_template = LANG_TO_INSTRUCTIONS [lang ]
8984
90- for sample in lang_samples :
91- sample . metadata = { "language" : lang }
92- if use_cot :
85+ if use_cot :
86+ cot_template = LANG_TO_INSTRUCTIONS [ lang ]
87+ for sample in lang_samples :
9388 cot_prompt = cot_template .format (prompt = sample .input )
9489 sample .input = cot_prompt
9590
@@ -110,7 +105,6 @@ def mgsm(
110105 languages = languages ,
111106 limit_samples_per_lang = limit_samples_per_lang ,
112107 use_cot = use_cot ,
113- shuffle = shuffle ,
114108 )
115109
116110 task = Task (
You can’t perform that action at this time.
0 commit comments