Commit b58e5556 authored by Baber's avatar Baber
Browse files

Merge branch 'main' into tasklist

# Conflicts:
#	pyproject.toml
parents 6e1866f5 4f8195f1
"dataset_name": "physics"
"include": "_default_egymmlu_template_yaml"
"tag":
- "egymmlu_stem_tasks"
- "egymmlu_ar_mmlu_tasks"
"task": "egymmlu_physics"
"task_alias": "physics"
"dataset_name": "political_science"
"include": "_default_egymmlu_template_yaml"
"tag":
- "egymmlu_social_sciences_tasks"
- "egymmlu_ar_mmlu_tasks"
"task": "egymmlu_political_science"
"task_alias": "political science"
"dataset_name": "professional_law"
"include": "_default_egymmlu_template_yaml"
"tag":
- "egymmlu_humanities_tasks"
- "egymmlu_mmlu_tasks"
"task": "egymmlu_professional_law"
"task_alias": "professional law"
"dataset_name": "professional_psychology"
"include": "_default_egymmlu_template_yaml"
"tag":
- "egymmlu_social_sciences_tasks"
- "egymmlu_mmlu_tasks"
"task": "egymmlu_professional_psychology"
"task_alias": "professional psychology"
"dataset_name": "public_relations"
"include": "_default_egymmlu_template_yaml"
"tag":
- "egymmlu_social_sciences_tasks"
- "egymmlu_mmlu_tasks"
"task": "egymmlu_public_relations"
"task_alias": "public relations"
"dataset_name": "security_studies"
"include": "_default_egymmlu_template_yaml"
"tag":
- "egymmlu_social_sciences_tasks"
- "egymmlu_mmlu_tasks"
"task": "egymmlu_security_studies"
"task_alias": "security studies"
"dataset_name": "social_science"
"include": "_default_egymmlu_template_yaml"
"tag":
- "egymmlu_social_sciences_tasks"
- "egymmlu_ar_mmlu_tasks"
"task": "egymmlu_social_science"
"task_alias": "social science"
"dataset_name": "sociology"
"include": "_default_egymmlu_template_yaml"
"tag":
- "egymmlu_social_sciences_tasks"
- "egymmlu_mmlu_tasks"
"task": "egymmlu_sociology"
"task_alias": "sociology"
"dataset_name": "world_religions"
"include": "_default_egymmlu_template_yaml"
"tag":
- "egymmlu_humanities_tasks"
- "egymmlu_mmlu_tasks"
"task": "egymmlu_world_religions"
"task_alias": "world religions"
PROMPT = "ده سؤال متعدد الاختيار (مع إجابته) على {}\n\n{}\n{}\n الجواب:"
alpha = ["A.", "B.", "C.", "D.", "E."]
def doc_to_text(doc):
subject = doc["egy_subject"] # subject_egyptian
question = (
doc["question"]
if doc["context"] == ""
else f"{doc['context']}\n\n{doc['question']}"
)
options = []
for i, opt in enumerate(doc["choices"]):
options.append(f"{alpha[i]} {opt}")
doc_text = PROMPT.format(subject, question, "\n".join(options))
return doc_text
def doc_to_choice(doc):
return [alpha[i][0] for i in range(len(doc["choices"]))]
...@@ -23,5 +23,3 @@ metric_list: ...@@ -23,5 +23,3 @@ metric_list:
higher_is_better: true higher_is_better: true
metadata: metadata:
version: 1.0 version: 1.0
dataset_kwargs:
trust_remote_code: true
tag: glue tag: glue
task: cola task: cola
dataset_path: glue dataset_path: nyu-mll/glue
dataset_name: cola dataset_name: cola
output_type: multiple_choice output_type: multiple_choice
training_split: train training_split: train
......
tag: glue tag: glue
task: mnli task: mnli
dataset_path: glue dataset_path: nyu-mll/glue
dataset_name: mnli dataset_name: mnli
output_type: multiple_choice output_type: multiple_choice
training_split: train training_split: train
......
tag: glue tag: glue
task: mrpc task: mrpc
dataset_path: glue dataset_path: nyu-mll/glue
dataset_name: mrpc dataset_name: mrpc
output_type: multiple_choice output_type: multiple_choice
training_split: train training_split: train
......
tag: glue tag: glue
task: qnli task: qnli
dataset_path: glue dataset_path: nyu-mll/glue
dataset_name: qnli dataset_name: qnli
output_type: multiple_choice output_type: multiple_choice
training_split: train training_split: train
......
tag: glue tag: glue
task: qqp task: qqp
dataset_path: glue dataset_path: nyu-mll/glue
dataset_name: qqp dataset_name: qqp
output_type: multiple_choice output_type: multiple_choice
training_split: train training_split: train
......
tag: glue tag: glue
task: rte task: rte
dataset_path: glue dataset_path: nyu-mll/glue
dataset_name: rte dataset_name: rte
output_type: multiple_choice output_type: multiple_choice
training_split: train training_split: train
......
tag: glue tag: glue
task: sst2 task: sst2
dataset_path: glue dataset_path: nyu-mll/glue
dataset_name: sst2 dataset_name: sst2
output_type: multiple_choice output_type: multiple_choice
training_split: train training_split: train
......
tag: glue tag: glue
task: wnli task: wnli
dataset_path: glue dataset_path: nyu-mll/glue
dataset_name: wnli dataset_name: wnli
output_type: multiple_choice output_type: multiple_choice
training_split: train training_split: train
......
...@@ -14,5 +14,4 @@ metric_list: ...@@ -14,5 +14,4 @@ metric_list:
aggregation: mean aggregation: mean
higher_is_better: true higher_is_better: true
dataset_kwargs: dataset_kwargs:
trust_remote_code: true
streaming: true streaming: true
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