Commit 601be343 authored by Baber's avatar Baber
Browse files

Merge branch 'main' into feature/eval_from_config

parents d0884a96 68c3a811
# Generated by utils.py
dataset_name: lug
doc_to_text: 'Please identify whether the premise entails or contradicts the hypothesis
in the following premise and hypothesis. The answer should be exact entailment,
contradiction, or neutral.
Premise: {premise}
Hypothesis: {hypothesis}
Is it entailment, contradiction, or neutral?'
include: afrixnli_translate_yaml
task: afrixnli_translate_lug_prompt_1
# Generated by utils.py
dataset_name: orm
doc_to_text: 'Please identify whether the premise entails or contradicts the hypothesis
in the following premise and hypothesis. The answer should be exact entailment,
contradiction, or neutral.
Premise: {premise}
Hypothesis: {hypothesis}
Is it entailment, contradiction, or neutral?'
include: afrixnli_translate_yaml
task: afrixnli_translate_orm_prompt_1
# Generated by utils.py
dataset_name: sna
doc_to_text: 'Please identify whether the premise entails or contradicts the hypothesis
in the following premise and hypothesis. The answer should be exact entailment,
contradiction, or neutral.
Premise: {premise}
Hypothesis: {hypothesis}
Is it entailment, contradiction, or neutral?'
include: afrixnli_translate_yaml
task: afrixnli_translate_sna_prompt_1
# Generated by utils.py
dataset_name: sot
doc_to_text: 'Please identify whether the premise entails or contradicts the hypothesis
in the following premise and hypothesis. The answer should be exact entailment,
contradiction, or neutral.
Premise: {premise}
Hypothesis: {hypothesis}
Is it entailment, contradiction, or neutral?'
include: afrixnli_translate_yaml
task: afrixnli_translate_sot_prompt_1
# Generated by utils.py
dataset_name: swa
doc_to_text: 'Please identify whether the premise entails or contradicts the hypothesis
in the following premise and hypothesis. The answer should be exact entailment,
contradiction, or neutral.
Premise: {premise}
Hypothesis: {hypothesis}
Is it entailment, contradiction, or neutral?'
include: afrixnli_translate_yaml
task: afrixnli_translate_swa_prompt_1
# Generated by utils.py
dataset_name: twi
doc_to_text: 'Please identify whether the premise entails or contradicts the hypothesis
in the following premise and hypothesis. The answer should be exact entailment,
contradiction, or neutral.
Premise: {premise}
Hypothesis: {hypothesis}
Is it entailment, contradiction, or neutral?'
include: afrixnli_translate_yaml
task: afrixnli_translate_twi_prompt_1
# Generated by utils.py
dataset_name: wol
doc_to_text: 'Please identify whether the premise entails or contradicts the hypothesis
in the following premise and hypothesis. The answer should be exact entailment,
contradiction, or neutral.
Premise: {premise}
Hypothesis: {hypothesis}
Is it entailment, contradiction, or neutral?'
include: afrixnli_translate_yaml
task: afrixnli_translate_wol_prompt_1
# Generated by utils.py
dataset_name: xho
doc_to_text: 'Please identify whether the premise entails or contradicts the hypothesis
in the following premise and hypothesis. The answer should be exact entailment,
contradiction, or neutral.
Premise: {premise}
Hypothesis: {hypothesis}
Is it entailment, contradiction, or neutral?'
include: afrixnli_translate_yaml
task: afrixnli_translate_xho_prompt_1
tag: afrixnli_tt_tasks
dataset_path: masakhane/afrixnli-translate-test
dataset_name: null
output_type: multiple_choice
test_split: test
fewshot_split: test
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
doc_to_text: 'Please identify whether the premise entails or contradicts the hypothesis
in the following premise and hypothesis. The answer should be exact entailment,
contradiction, or neutral.
Premise: {premise}
Hypothesis: {hypothesis}
Is it entailment, contradiction, or neutral?'
include: afrixnli_translate_yaml
task: afrixnli_translate_yor_prompt_1
# Generated by utils.py
dataset_name: zul
doc_to_text: 'Please identify whether the premise entails or contradicts the hypothesis
in the following premise and hypothesis. The answer should be exact entailment,
contradiction, or neutral.
Premise: {premise}
Hypothesis: {hypothesis}
Is it entailment, contradiction, or neutral?'
include: afrixnli_translate_yaml
task: afrixnli_translate_zul_prompt_1
from lm_eval.utils import weighted_f1_score
def doc_to_text(doc):
output = """Please identify whether the premise entails or contradicts the hypothesis in the following premise
and hypothesis. The answer should be exact entailment, contradiction, or neutral.
Premise: {premise}
Hypothesis: {hypothesis}
Is it entailment, contradiction, or neutral?"""
text = output.format(premise=doc["premise"], hypothesis=doc["hypothesis"])
return text
def doc_to_target(doc):
replacements = {0: "entailment", 1: "neutral", 2: "contradiction"}
return replacements[doc["label"]]
# Generated by utils.py
dataset_name: amh
include: afrixnli_translate_yaml
task: afrixnli_translate_amh_prompt_2
# Generated by utils.py
dataset_name: ewe
include: afrixnli_translate_yaml
task: afrixnli_translate_ewe_prompt_2
# Generated by utils.py
dataset_name: fra
include: afrixnli_translate_yaml
task: afrixnli_translate_fra_prompt_2
# Generated by utils.py
dataset_name: hau
include: afrixnli_translate_yaml
task: afrixnli_translate_hau_prompt_2
# Generated by utils.py
dataset_name: ibo
include: afrixnli_translate_yaml
task: afrixnli_translate_ibo_prompt_2
# Generated by utils.py
dataset_name: kin
include: afrixnli_translate_yaml
task: afrixnli_translate_kin_prompt_2
# Generated by utils.py
dataset_name: lin
include: afrixnli_translate_yaml
task: afrixnli_translate_lin_prompt_2
# Generated by utils.py
dataset_name: lug
include: afrixnli_translate_yaml
task: afrixnli_translate_lug_prompt_2
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