Commit b13753cd authored by haileyschoelkopf's avatar haileyschoelkopf
Browse files

Merge branch 'main' into fix-task-table

parents 8ea9c59d 5c25dd55
include: _hellaswag_yaml
task: hellaswag_ro
dataset_path: alexandrainst/m_hellaswag
dataset_name: ro
training_split: null
validation_split: val
include: _hellaswag_yaml
task: hellaswag_ru
dataset_path: alexandrainst/m_hellaswag
dataset_name: ru
training_split: null
validation_split: val
include: _hellaswag_yaml
task: hellaswag_sk
dataset_path: alexandrainst/m_hellaswag
dataset_name: sk
training_split: null
validation_split: val
include: _hellaswag_yaml
task: hellaswag_sr
dataset_path: alexandrainst/m_hellaswag
dataset_name: sr
training_split: null
validation_split: val
include: _hellaswag_yaml
task: hellaswag_sv
dataset_path: alexandrainst/m_hellaswag
dataset_name: sv
training_split: null
validation_split: val
include: _hellaswag_yaml
task: hellaswag_ta
dataset_path: alexandrainst/m_hellaswag
dataset_name: ta
training_split: null
validation_split: val
include: _hellaswag_yaml
task: hellaswag_te
dataset_path: alexandrainst/m_hellaswag
dataset_name: te
training_split: null
validation_split: val
include: _hellaswag_yaml
task: hellaswag_uk
dataset_path: alexandrainst/m_hellaswag
dataset_name: uk
training_split: null
validation_split: val
include: _hellaswag_yaml
task: hellaswag_vi
dataset_path: alexandrainst/m_hellaswag
dataset_name: vi
training_split: null
validation_split: val
import datasets
import re
def preprocess(text):
text = text.strip()
# NOTE: Brackets are artifacts of the WikiHow dataset portion of HellaSwag.
text = text.replace(" [title]", ". ")
text = re.sub("\\[.*?\\]", "", text)
text = text.replace(" ", " ")
return text
def process_docs(dataset: datasets.Dataset) -> datasets.Dataset:
def _process_doc(doc):
ctx = doc["ctx_a"] + " " + doc["ctx_b"].capitalize()
out_doc = {
"query": preprocess(doc["activity_label"] + ": " + ctx),
"choices": [preprocess(ending) for ending in doc["endings"]],
"gold": int(doc["label"]),
}
return out_doc
return dataset.map(_process_doc)
...@@ -2,7 +2,7 @@ group: ...@@ -2,7 +2,7 @@ group:
- polemo2 - polemo2
task: polemo2_in task: polemo2_in
dataset_path: allegro/klej-polemo2-in dataset_path: allegro/klej-polemo2-in
dataset_name: klej-polemo2-in dataset_name: null
output_type: generate_until output_type: generate_until
training_split: train training_split: train
validation_split: validation validation_split: validation
...@@ -41,5 +41,6 @@ metric_list: ...@@ -41,5 +41,6 @@ metric_list:
- metric: accuracy - metric: accuracy
aggregation: mean aggregation: mean
higher_is_better: true higher_is_better: true
hf_evaluate: true
metadata: metadata:
version: 0.0 version: 1.0
...@@ -15,4 +15,4 @@ metric_list: ...@@ -15,4 +15,4 @@ metric_list:
aggregation: mean aggregation: mean
higher_is_better: true higher_is_better: true
metadata: metadata:
version: 1.0 version: 2.0
...@@ -17,7 +17,25 @@ Homepage: https://www.cs.cmu.edu/~glai1/data/race/ ...@@ -17,7 +17,25 @@ Homepage: https://www.cs.cmu.edu/~glai1/data/race/
### Citation ### Citation
``` ```
BibTeX-formatted citation goes here @inproceedings{lai-etal-2017-race,
title = "{RACE}: Large-scale {R}e{A}ding Comprehension Dataset From Examinations",
author = "Lai, Guokun and
Xie, Qizhe and
Liu, Hanxiao and
Yang, Yiming and
Hovy, Eduard",
editor = "Palmer, Martha and
Hwa, Rebecca and
Riedel, Sebastian",
booktitle = "Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing",
month = sep,
year = "2017",
address = "Copenhagen, Denmark",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/D17-1082",
doi = "10.18653/v1/D17-1082",
pages = "785--794"
}
``` ```
### Groups and Tasks ### Groups and Tasks
......
...@@ -108,7 +108,7 @@ def _num_cpu_cores(): ...@@ -108,7 +108,7 @@ def _num_cpu_cores():
class _SCROLLSTask(Task): class _SCROLLSTask(Task):
VERSION = 1 VERSION = 2
DATASET_PATH = "tau/scrolls" DATASET_PATH = "tau/scrolls"
DATASET_NAME = None DATASET_NAME = None
PRUNE_TOKENIZERS = None PRUNE_TOKENIZERS = None
......
...@@ -49,7 +49,7 @@ def _squad_agg(key, items): ...@@ -49,7 +49,7 @@ def _squad_agg(key, items):
@register_task("squadv2") @register_task("squadv2")
class SQuAD2(Task): class SQuAD2(Task):
VERSION = 2 VERSION = 3
DATASET_PATH = "squad_v2" DATASET_PATH = "squad_v2"
DATASET_NAME = None DATASET_NAME = None
......
...@@ -14,4 +14,4 @@ generation_kwargs: ...@@ -14,4 +14,4 @@ generation_kwargs:
temperature: 0.0 temperature: 0.0
repeats: 1 repeats: 1
metadata: metadata:
version: 0.0 version: 1.0
...@@ -28,4 +28,4 @@ metric_list: ...@@ -28,4 +28,4 @@ metric_list:
ignore_case: true ignore_case: true
ignore_punctuation: true ignore_punctuation: true
metadata: metadata:
version: 2.0 version: 3.0
...@@ -76,4 +76,4 @@ metric_list: ...@@ -76,4 +76,4 @@ metric_list:
aggregation: mean aggregation: mean
higher_is_better: true higher_is_better: true
metadata: metadata:
version: 2.0 version: 3.0
...@@ -17,4 +17,4 @@ metric_list: ...@@ -17,4 +17,4 @@ metric_list:
ignore_case: false ignore_case: false
ignore_punctuation: false ignore_punctuation: false
metadata: metadata:
version: 1.0 version: 2.0
...@@ -17,4 +17,4 @@ metric_list: ...@@ -17,4 +17,4 @@ metric_list:
ignore_case: false ignore_case: false
ignore_punctuation: false ignore_punctuation: false
metadata: metadata:
version: 1.0 version: 2.0
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