Commit c1e63555 authored by Yu Shi Jie's avatar Yu Shi Jie
Browse files

Merge branch 'upstream' into 'mmlu-pro'

add tokenizer logs info (#1731)

See merge request shijie.yu/lm-evaluation-harness!4
parents e361687c 42dc2448
from sklearn.metrics import f1_score
def doc_to_target(doc):
replacements = {0: "True", 1: "Neither", 2: "False"}
return replacements[doc["label"]]
def weighted_f1_score(items):
unzipped_list = list(zip(*items))
golds = unzipped_list[0]
preds = unzipped_list[1]
fscore = f1_score(golds, preds, average="weighted")
return fscore
# Generated by utils.py
dataset_name: amh
include: afrixnli_manual_direct_yaml
task: afrixnli_manual_direct_amh
# Generated by utils.py
dataset_name: eng
include: afrixnli_manual_direct_yaml
task: afrixnli_manual_direct_eng
# Generated by utils.py
dataset_name: ewe
include: afrixnli_manual_direct_yaml
task: afrixnli_manual_direct_ewe
# Generated by utils.py
dataset_name: fra
include: afrixnli_manual_direct_yaml
task: afrixnli_manual_direct_fra
# Generated by utils.py
dataset_name: hau
include: afrixnli_manual_direct_yaml
task: afrixnli_manual_direct_hau
# Generated by utils.py
dataset_name: ibo
include: afrixnli_manual_direct_yaml
task: afrixnli_manual_direct_ibo
# Generated by utils.py
dataset_name: kin
include: afrixnli_manual_direct_yaml
task: afrixnli_manual_direct_kin
# Generated by utils.py
dataset_name: lin
include: afrixnli_manual_direct_yaml
task: afrixnli_manual_direct_lin
# Generated by utils.py
dataset_name: lug
include: afrixnli_manual_direct_yaml
task: afrixnli_manual_direct_lug
# Generated by utils.py
dataset_name: orm
include: afrixnli_manual_direct_yaml
task: afrixnli_manual_direct_orm
# Generated by utils.py
dataset_name: sna
include: afrixnli_manual_direct_yaml
task: afrixnli_manual_direct_sna
# Generated by utils.py
dataset_name: sot
include: afrixnli_manual_direct_yaml
task: afrixnli_manual_direct_sot
# Generated by utils.py
dataset_name: swa
include: afrixnli_manual_direct_yaml
task: afrixnli_manual_direct_swa
# Generated by utils.py
dataset_name: twi
include: afrixnli_manual_direct_yaml
task: afrixnli_manual_direct_twi
# Generated by utils.py
dataset_name: wol
include: afrixnli_manual_direct_yaml
task: afrixnli_manual_direct_wol
# Generated by utils.py
dataset_name: xho
include: afrixnli_manual_direct_yaml
task: afrixnli_manual_direct_xho
group:
- xnli
- afrixnli
- afrixnli_manual_direct
dataset_path: masakhane/afrixnli
dataset_name: null
output_type: multiple_choice
validation_split: validation
test_split: test
fewshot_split: validation
doc_to_text: !function utils.doc_to_text
doc_to_target: !function utils.doc_to_target
doc_to_choice:
- "entailment"
- "neutral"
- "contradiction"
should_decontaminate: true
doc_to_decontamination_query: premise
metric_list:
- metric: f1
aggregation: !function utils.weighted_f1_score
average: weighted
higher_is_better: True
ignore_case: true
ignore_punctuation: true
- metric: acc
aggregation: mean
higher_is_better: true
ignore_case: true
ignore_punctuation: true
metadata:
version: 1.0
# Generated by utils.py
dataset_name: yor
include: afrixnli_manual_direct_yaml
task: afrixnli_manual_direct_yor
# Generated by utils.py
dataset_name: zul
include: afrixnli_manual_direct_yaml
task: afrixnli_manual_direct_zul
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