Unverified Commit 9b0b15b1 authored by James A. Michaelov's avatar James A. Michaelov Committed by GitHub
Browse files

fixed belebele (#1267)

parent 7264a2e0
group: belebele group: belebele
dataset_path: facebook/belebele dataset_path: facebook/belebele
test_split: test
fewshot_split: test
fewshot_config: fewshot_config:
sampler: first_n sampler: first_n
output_type: multiple_choice output_type: multiple_choice
......
...@@ -8,7 +8,7 @@ import requests ...@@ -8,7 +8,7 @@ import requests
from tqdm import tqdm from tqdm import tqdm
from lm_eval.logger import eval_logger from lm_eval.utils import logging
API_URL = "https://datasets-server.huggingface.co/splits?dataset=facebook/belebele" API_URL = "https://datasets-server.huggingface.co/splits?dataset=facebook/belebele"
...@@ -39,8 +39,8 @@ if __name__ == "__main__": ...@@ -39,8 +39,8 @@ if __name__ == "__main__":
def query(): def query():
response = requests.get(API_URL) response = requests.get(API_URL)
return response.json()["splits"] return response.json()["splits"]
print(query())
languages = [split["config"] for split in query()] languages = [split["split"] for split in query()]
for lang in tqdm(languages): for lang in tqdm(languages):
yaml_dict = { yaml_dict = {
...@@ -48,11 +48,12 @@ if __name__ == "__main__": ...@@ -48,11 +48,12 @@ if __name__ == "__main__":
"task": f"belebele_{args.task_prefix}_{lang}" "task": f"belebele_{args.task_prefix}_{lang}"
if args.task_prefix != "" if args.task_prefix != ""
else f"belebele_{lang}", else f"belebele_{lang}",
"dataset_name": lang, "test_split": lang,
"fewshot_split":lang,
} }
file_save_path = args.save_prefix_path + f"_{lang}.yaml" file_save_path = args.save_prefix_path + f"_{lang}.yaml"
eval_logger.info(f"Saving yaml for subset {lang} to {file_save_path}") logging.info(f"Saving yaml for subset {lang} to {file_save_path}")
with open(file_save_path, "w") as yaml_file: with open(file_save_path, "w") as yaml_file:
yaml.dump( yaml.dump(
yaml_dict, yaml_dict,
......
"dataset_name": "acm_Arab" "fewshot_split": "acm_Arab"
"include": "_default_template_yaml" "include": "_default_template_yaml"
"task": "belebele_acm_Arab" "task": "belebele_acm_Arab"
"test_split": "acm_Arab"
"dataset_name": "afr_Latn" "fewshot_split": "afr_Latn"
"include": "_default_template_yaml" "include": "_default_template_yaml"
"task": "belebele_afr_Latn" "task": "belebele_afr_Latn"
"test_split": "afr_Latn"
"dataset_name": "als_Latn" "fewshot_split": "als_Latn"
"include": "_default_template_yaml" "include": "_default_template_yaml"
"task": "belebele_als_Latn" "task": "belebele_als_Latn"
"test_split": "als_Latn"
"dataset_name": "amh_Ethi" "fewshot_split": "amh_Ethi"
"include": "_default_template_yaml" "include": "_default_template_yaml"
"task": "belebele_amh_Ethi" "task": "belebele_amh_Ethi"
"test_split": "amh_Ethi"
"dataset_name": "apc_Arab" "fewshot_split": "apc_Arab"
"include": "_default_template_yaml" "include": "_default_template_yaml"
"task": "belebele_apc_Arab" "task": "belebele_apc_Arab"
"test_split": "apc_Arab"
"dataset_name": "arb_Arab" "fewshot_split": "arb_Arab"
"include": "_default_template_yaml" "include": "_default_template_yaml"
"task": "belebele_arb_Arab" "task": "belebele_arb_Arab"
"test_split": "arb_Arab"
"dataset_name": "arb_Latn" "fewshot_split": "arb_Latn"
"include": "_default_template_yaml" "include": "_default_template_yaml"
"task": "belebele_arb_Latn" "task": "belebele_arb_Latn"
"test_split": "arb_Latn"
"dataset_name": "ars_Arab" "fewshot_split": "ars_Arab"
"include": "_default_template_yaml" "include": "_default_template_yaml"
"task": "belebele_ars_Arab" "task": "belebele_ars_Arab"
"test_split": "ars_Arab"
"dataset_name": "ary_Arab" "fewshot_split": "ary_Arab"
"include": "_default_template_yaml" "include": "_default_template_yaml"
"task": "belebele_ary_Arab" "task": "belebele_ary_Arab"
"test_split": "ary_Arab"
"dataset_name": "arz_Arab" "fewshot_split": "arz_Arab"
"include": "_default_template_yaml" "include": "_default_template_yaml"
"task": "belebele_arz_Arab" "task": "belebele_arz_Arab"
"test_split": "arz_Arab"
"dataset_name": "asm_Beng" "fewshot_split": "asm_Beng"
"include": "_default_template_yaml" "include": "_default_template_yaml"
"task": "belebele_asm_Beng" "task": "belebele_asm_Beng"
"test_split": "asm_Beng"
"dataset_name": "azj_Latn" "fewshot_split": "azj_Latn"
"include": "_default_template_yaml" "include": "_default_template_yaml"
"task": "belebele_azj_Latn" "task": "belebele_azj_Latn"
"test_split": "azj_Latn"
"dataset_name": "bam_Latn" "fewshot_split": "bam_Latn"
"include": "_default_template_yaml" "include": "_default_template_yaml"
"task": "belebele_bam_Latn" "task": "belebele_bam_Latn"
"test_split": "bam_Latn"
"dataset_name": "ben_Beng" "fewshot_split": "ben_Beng"
"include": "_default_template_yaml" "include": "_default_template_yaml"
"task": "belebele_ben_Beng" "task": "belebele_ben_Beng"
"test_split": "ben_Beng"
"dataset_name": "ben_Latn" "fewshot_split": "ben_Latn"
"include": "_default_template_yaml" "include": "_default_template_yaml"
"task": "belebele_ben_Latn" "task": "belebele_ben_Latn"
"test_split": "ben_Latn"
"dataset_name": "bod_Tibt" "fewshot_split": "bod_Tibt"
"include": "_default_template_yaml" "include": "_default_template_yaml"
"task": "belebele_bod_Tibt" "task": "belebele_bod_Tibt"
"test_split": "bod_Tibt"
"dataset_name": "bul_Cyrl" "fewshot_split": "bul_Cyrl"
"include": "_default_template_yaml" "include": "_default_template_yaml"
"task": "belebele_bul_Cyrl" "task": "belebele_bul_Cyrl"
"test_split": "bul_Cyrl"
"dataset_name": "cat_Latn" "fewshot_split": "cat_Latn"
"include": "_default_template_yaml" "include": "_default_template_yaml"
"task": "belebele_cat_Latn" "task": "belebele_cat_Latn"
"test_split": "cat_Latn"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment