Upload from GitHub Actions: Fix vibecoding
Browse files- evals/datasets_/mmlu.py +2 -2
- evals/main.py +1 -1
evals/datasets_/mmlu.py
CHANGED
@@ -143,13 +143,13 @@ def load_mmlu(language_bcp_47, nr):
|
|
143 |
a.rsplit("_", 1)[1].split("-")[0].lower()
|
144 |
for a in _get_dataset_config_names("Eurolingua/mmlux", trust_remote_code=True)
|
145 |
)
|
146 |
-
if language_bcp_47 in tags_afrimmlu:
|
147 |
ds = _load_dataset("masakhane/afrimmlu", tags_afrimmlu[language_bcp_47])
|
148 |
ds = ds.map(parse_choices)
|
149 |
examples = ds["dev"].filter(lambda x: x["subject"] == category)
|
150 |
task = ds["test"].filter(lambda x: x["subject"] == category)[i]
|
151 |
return "masakhane/afrimmlu", examples, task
|
152 |
-
elif language_bcp_47 in tags_global_mmlu:
|
153 |
ds = _load_dataset("CohereForAI/Global-MMLU", tags_global_mmlu[language_bcp_47])
|
154 |
ds = ds.map(add_choices)
|
155 |
examples = ds["dev"].filter(lambda x: x["subject"] == category)
|
|
|
143 |
a.rsplit("_", 1)[1].split("-")[0].lower()
|
144 |
for a in _get_dataset_config_names("Eurolingua/mmlux", trust_remote_code=True)
|
145 |
)
|
146 |
+
if language_bcp_47 in tags_afrimmlu.keys():
|
147 |
ds = _load_dataset("masakhane/afrimmlu", tags_afrimmlu[language_bcp_47])
|
148 |
ds = ds.map(parse_choices)
|
149 |
examples = ds["dev"].filter(lambda x: x["subject"] == category)
|
150 |
task = ds["test"].filter(lambda x: x["subject"] == category)[i]
|
151 |
return "masakhane/afrimmlu", examples, task
|
152 |
+
elif language_bcp_47 in tags_global_mmlu.keys():
|
153 |
ds = _load_dataset("CohereForAI/Global-MMLU", tags_global_mmlu[language_bcp_47])
|
154 |
ds = ds.map(add_choices)
|
155 |
examples = ds["dev"].filter(lambda x: x["subject"] == category)
|
evals/main.py
CHANGED
@@ -20,7 +20,7 @@ async def evaluate():
|
|
20 |
print("running evaluations")
|
21 |
old_results = pd.read_json("results.json")
|
22 |
results = [
|
23 |
-
task(
|
24 |
for task_name, task in tasks.items()
|
25 |
for i in range(n_sentences)
|
26 |
for lang in languages.iloc[:n_languages].itertuples()
|
|
|
20 |
print("running evaluations")
|
21 |
old_results = pd.read_json("results.json")
|
22 |
results = [
|
23 |
+
task(model, lang.bcp_47, i)
|
24 |
for task_name, task in tasks.items()
|
25 |
for i in range(n_sentences)
|
26 |
for lang in languages.iloc[:n_languages].itertuples()
|