Commit 0d1ef037 authored by lintangsutawika's avatar lintangsutawika
Browse files

solved merge conflict

parents aa44be3f ada4a31d
...@@ -24,4 +24,4 @@ filter_list: ...@@ -24,4 +24,4 @@ filter_list:
- function: "take_first" - function: "take_first"
num_fewshot: 0 num_fewshot: 0
metadata: metadata:
- version: 0 version: 1.0
...@@ -18,4 +18,4 @@ generation_kwargs: ...@@ -18,4 +18,4 @@ generation_kwargs:
temperature: 0.0 temperature: 0.0
num_fewshot: 0 num_fewshot: 0
metadata: metadata:
- version: 0 version: 1.0
...@@ -18,4 +18,4 @@ generation_kwargs: ...@@ -18,4 +18,4 @@ generation_kwargs:
temperature: 0.0 temperature: 0.0
num_fewshot: 0 num_fewshot: 0
metadata: metadata:
- version: 0 version: 1.0
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
...@@ -18,4 +16,4 @@ metric_list: ...@@ -18,4 +16,4 @@ metric_list:
aggregation: mean aggregation: mean
higher_is_better: true higher_is_better: true
metadata: metadata:
- version: 0.0 version: 0.0
...@@ -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"
...@@ -23,7 +23,6 @@ def parse_args(): ...@@ -23,7 +23,6 @@ def parse_args():
if __name__ == "__main__": if __name__ == "__main__":
args = parse_args() args = parse_args()
# get filename of base_yaml so we can `"include": ` it in our other YAMLs. # get filename of base_yaml so we can `"include": ` it in our other YAMLs.
...@@ -40,8 +39,8 @@ if __name__ == "__main__": ...@@ -40,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 = {
...@@ -49,11 +48,12 @@ if __name__ == "__main__": ...@@ -49,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"
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