tasksource 0.0.43__tar.gz → 0.0.46__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tasksource-0.0.43 → tasksource-0.0.46}/PKG-INFO +1 -1
- {tasksource-0.0.43 → tasksource-0.0.46}/src/tasksource/.ipynb_checkpoints/preprocess-checkpoint.py +33 -5
- {tasksource-0.0.43 → tasksource-0.0.46}/src/tasksource/.ipynb_checkpoints/recast-checkpoint.py +4 -2
- {tasksource-0.0.43 → tasksource-0.0.46}/src/tasksource/.ipynb_checkpoints/tasks-checkpoint.py +127 -60
- tasksource-0.0.46/src/tasksource/access.py +108 -0
- {tasksource-0.0.43 → tasksource-0.0.46}/src/tasksource/preprocess.py +33 -5
- {tasksource-0.0.43 → tasksource-0.0.46}/src/tasksource/recast.py +4 -2
- {tasksource-0.0.43 → tasksource-0.0.46}/src/tasksource/tasks.py +127 -60
- {tasksource-0.0.43 → tasksource-0.0.46}/src/tasksource.egg-info/PKG-INFO +1 -1
- {tasksource-0.0.43 → tasksource-0.0.46}/src/tasksource.egg-info/SOURCES.txt +1 -0
- tasksource-0.0.46/tasks.md +664 -0
- tasksource-0.0.43/tasks.md +0 -643
- {tasksource-0.0.43 → tasksource-0.0.46}/.github/scripts/release.py +0 -0
- {tasksource-0.0.43 → tasksource-0.0.46}/.github/workflows/python-publish.yml +0 -0
- {tasksource-0.0.43 → tasksource-0.0.46}/.github/workflows/release.yml +0 -0
- {tasksource-0.0.43 → tasksource-0.0.46}/.gitignore +0 -0
- {tasksource-0.0.43 → tasksource-0.0.46}/CITATION.cff +0 -0
- {tasksource-0.0.43 → tasksource-0.0.46}/LICENSE +0 -0
- {tasksource-0.0.43 → tasksource-0.0.46}/README.md +0 -0
- {tasksource-0.0.43 → tasksource-0.0.46}/mtasks.md +0 -0
- {tasksource-0.0.43 → tasksource-0.0.46}/pyproject.toml +0 -0
- {tasksource-0.0.43 → tasksource-0.0.46}/setup.cfg +0 -0
- /tasksource-0.0.43/src/tasksource/access.py → /tasksource-0.0.46/src/tasksource/.ipynb_checkpoints/access-checkpoint.py +0 -0
- {tasksource-0.0.43 → tasksource-0.0.46}/src/tasksource/__init__.py +0 -0
- {tasksource-0.0.43 → tasksource-0.0.46}/src/tasksource/metadata/__init__.py +0 -0
- {tasksource-0.0.43 → tasksource-0.0.46}/src/tasksource/metadata/bigbench_groups.py +0 -0
- {tasksource-0.0.43 → tasksource-0.0.46}/src/tasksource/metadata/blimp_groups.py +0 -0
- {tasksource-0.0.43 → tasksource-0.0.46}/src/tasksource/metadata/original.txt +0 -0
- {tasksource-0.0.43 → tasksource-0.0.46}/src/tasksource/metadata/popularity.py +0 -0
- {tasksource-0.0.43 → tasksource-0.0.46}/src/tasksource/mtasks.py +0 -0
- {tasksource-0.0.43 → tasksource-0.0.46}/src/tasksource.egg-info/dependency_links.txt +0 -0
- {tasksource-0.0.43 → tasksource-0.0.46}/src/tasksource.egg-info/requires.txt +0 -0
- {tasksource-0.0.43 → tasksource-0.0.46}/src/tasksource.egg-info/top_level.txt +0 -0
{tasksource-0.0.43 → tasksource-0.0.46}/src/tasksource/.ipynb_checkpoints/preprocess-checkpoint.py
RENAMED
|
@@ -11,6 +11,8 @@ import copy
|
|
|
11
11
|
import datasets
|
|
12
12
|
import time
|
|
13
13
|
|
|
14
|
+
MAX_MC_OPTIONS = 4
|
|
15
|
+
|
|
14
16
|
def get_column_names(dataset):
|
|
15
17
|
cn = dataset.column_names
|
|
16
18
|
if type(cn)==dict:
|
|
@@ -28,6 +30,11 @@ def sample_dataset(dataset,n=10000, n_eval=1000,seed=0):
|
|
|
28
30
|
|
|
29
31
|
class Preprocessing(DotWiz):
|
|
30
32
|
default_splits = ('train','validation','test')
|
|
33
|
+
_instances = []
|
|
34
|
+
|
|
35
|
+
def __post_init__(self):
|
|
36
|
+
Preprocessing._instances+=[self]
|
|
37
|
+
|
|
31
38
|
@staticmethod
|
|
32
39
|
def __map_to_target(x,fn=lambda x:None, target=None):
|
|
33
40
|
x[target]=fn(x)
|
|
@@ -158,12 +165,15 @@ class MultipleChoiceFields(Preprocessing):
|
|
|
158
165
|
if self.choices_list:
|
|
159
166
|
dataset = dataset.filter(lambda x: 1<len(x['choices_list']))
|
|
160
167
|
n_options = min([len(x) for k in dataset for x in dataset[k]['choices_list']])
|
|
161
|
-
n_options = min(
|
|
162
|
-
dataset = dataset.map(self.
|
|
168
|
+
n_options = min(MAX_MC_OPTIONS,n_options)
|
|
169
|
+
dataset = dataset.map(self.flatten_choice_list, fn_kwargs={'n_options':n_options})
|
|
170
|
+
|
|
171
|
+
else:
|
|
172
|
+
dataset = dataset.map(self.sample_choices, fn_kwargs={'n_options':MAX_MC_OPTIONS})
|
|
163
173
|
return dataset
|
|
164
174
|
|
|
165
175
|
@staticmethod
|
|
166
|
-
def
|
|
176
|
+
def flatten_choice_list(x, n_options=None):
|
|
167
177
|
n_neg = n_options-1 if n_options else None
|
|
168
178
|
choices = x['choices_list']
|
|
169
179
|
label=x['labels']
|
|
@@ -176,13 +186,31 @@ class MultipleChoiceFields(Preprocessing):
|
|
|
176
186
|
del x['choices_list']
|
|
177
187
|
return x
|
|
178
188
|
|
|
189
|
+
@staticmethod
|
|
190
|
+
def sample_choices(x, n_options=None):
|
|
191
|
+
choices = [x[c] for c in x if 'choice' in c]
|
|
192
|
+
if not MAX_MC_OPTIONS or len(choices)<=n_options:
|
|
193
|
+
return x
|
|
194
|
+
n_neg = n_options-1 if n_options else None
|
|
195
|
+
label=x['labels']
|
|
196
|
+
neg = choices[:label] + choices[label+1:]
|
|
197
|
+
pos = choices[label]
|
|
198
|
+
x['labels']=0
|
|
199
|
+
choices_list=[pos]+neg[:n_neg]
|
|
200
|
+
for c in list(x):
|
|
201
|
+
if 'choice' in c:
|
|
202
|
+
del x[c]
|
|
203
|
+
for i,o in enumerate(choices_list):
|
|
204
|
+
x[f'choice{i}']=o
|
|
205
|
+
return x
|
|
206
|
+
|
|
179
207
|
@dataclass
|
|
180
208
|
class SharedFields:
|
|
181
209
|
splits:list=Preprocessing.default_splits
|
|
182
210
|
dataset_name:str = None
|
|
183
211
|
config_name:str = None
|
|
184
|
-
pre_process: callable =
|
|
185
|
-
post_process: callable =
|
|
212
|
+
pre_process: callable = fc.identity
|
|
213
|
+
post_process: callable = fc.identity
|
|
186
214
|
#language:str="en"
|
|
187
215
|
|
|
188
216
|
|
{tasksource-0.0.43 → tasksource-0.0.46}/src/tasksource/.ipynb_checkpoints/recast-checkpoint.py
RENAMED
|
@@ -8,12 +8,14 @@ improper_labels += ['glue/stsb', 'sick/relatedness', 'joci', 'utilitarianism', '
|
|
|
8
8
|
|
|
9
9
|
improper_labels += ['stsb_multi_mt','MLMA_hate_speech','icl-symbol-tuning-instruct','zero-shot-label-nli']
|
|
10
10
|
|
|
11
|
+
improper_labels += ['essay-scoring','english-grading','HelpSteer','oasst2']
|
|
12
|
+
|
|
11
13
|
def render_options(options):
|
|
12
14
|
options = [f'"{x}"' for x in options]
|
|
13
15
|
return f"{', '.join(options[:-1])} or {options[-1]}"
|
|
14
16
|
|
|
15
17
|
def render_classification(text,options,answer):
|
|
16
|
-
example = '
|
|
18
|
+
example = 'text_A→text_B' if text.startswith('text_A:') else 'the following'
|
|
17
19
|
inputs = f'With no explanation, label {example} with either {render_options(options)}.\n{text}'
|
|
18
20
|
targets = f"{answer}."
|
|
19
21
|
return dict_of(inputs,targets)
|
|
@@ -99,7 +101,7 @@ def recast_instruct(dataset):
|
|
|
99
101
|
|
|
100
102
|
def recast_Classification(x):
|
|
101
103
|
if 'sentence2' in x:
|
|
102
|
-
text=f"
|
|
104
|
+
text=f"text_A: {x['sentence1']}\ntext_B: {x['sentence2']}"
|
|
103
105
|
else:
|
|
104
106
|
text=x['sentence1']
|
|
105
107
|
|
{tasksource-0.0.43 → tasksource-0.0.46}/src/tasksource/.ipynb_checkpoints/tasks-checkpoint.py
RENAMED
|
@@ -38,8 +38,8 @@ anli__a3 = Classification('premise','hypothesis','label', splits=['train_r3','de
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
babi_nli = Classification("premise", "hypothesis", "label",
|
|
41
|
-
dataset_name="
|
|
42
|
-
config_name=set(get_dataset_config_names("
|
|
41
|
+
dataset_name="tasksource/babi_nli",
|
|
42
|
+
config_name=set(get_dataset_config_names("tasksource/babi_nli"))-{"agents-motivations"}
|
|
43
43
|
) # agents-motivations task is not as clear-cut as the others
|
|
44
44
|
|
|
45
45
|
|
|
@@ -60,7 +60,7 @@ hans = Classification(sentence1="premise", sentence2="hypothesis", labels="label
|
|
|
60
60
|
|
|
61
61
|
wanli = Classification('premise','hypothesis','gold', dataset_name="alisawuffles/WANLI")
|
|
62
62
|
|
|
63
|
-
recast_nli = Classification(sentence1="context", sentence2="hypothesis", labels="label", dataset_name="
|
|
63
|
+
recast_nli = Classification(sentence1="context", sentence2="hypothesis", labels="label", dataset_name="tasksource/recast",
|
|
64
64
|
config_name=['recast_kg_relations', 'recast_puns', 'recast_factuality', 'recast_verbnet',
|
|
65
65
|
'recast_verbcorner', 'recast_ner', 'recast_sentiment', 'recast_megaveridicality'])
|
|
66
66
|
|
|
@@ -69,7 +69,7 @@ probability_words_nli = Classification(sentence1="context", sentence2="hypothesi
|
|
|
69
69
|
dataset_name="sileod/probability_words_nli",
|
|
70
70
|
config_name=["reasoning_1hop","reasoning_2hop","usnli"])
|
|
71
71
|
|
|
72
|
-
nan_nli = Classification("premise", "hypothesis", "label", dataset_name="joey234/nan-nli"
|
|
72
|
+
nan_nli = Classification("premise", "hypothesis", "label", dataset_name="joey234/nan-nli")
|
|
73
73
|
|
|
74
74
|
nli_fever = Classification("premise","hypothesis","label",
|
|
75
75
|
dataset_name="pietrolesci/nli_fever", splits=["train","dev",None])
|
|
@@ -153,15 +153,15 @@ def _imppres_post_process(ds,prefix=''):
|
|
|
153
153
|
names=[f'{prefix}_entailment',f'{prefix}_neutral',f'{prefix}_contradiction']))
|
|
154
154
|
|
|
155
155
|
imppres__presupposition = imppres__prag = Classification("premise","hypothesis","gold_label",
|
|
156
|
-
dataset_name="
|
|
156
|
+
dataset_name="tasksource/imppres", config_name=imppres_presupposition,
|
|
157
157
|
post_process=_imppres_post_process)
|
|
158
158
|
|
|
159
159
|
imppres__prag = Classification("premise","hypothesis","gold_label_prag",
|
|
160
|
-
dataset_name="
|
|
160
|
+
dataset_name="tasksource/imppres", config_name=imppres_implicature,
|
|
161
161
|
post_process=lambda x: _imppres_post_process(x,'pragmatic'))
|
|
162
162
|
|
|
163
163
|
imppres__log = Classification("premise","hypothesis","gold_label_log",
|
|
164
|
-
dataset_name="
|
|
164
|
+
dataset_name="tasksource/imppres", config_name=imppres_implicature,
|
|
165
165
|
post_process=lambda x: _imppres_post_process(x,'logical'))
|
|
166
166
|
|
|
167
167
|
|
|
@@ -212,6 +212,7 @@ bigbench = MultipleChoice(
|
|
|
212
212
|
dataset_name='tasksource/bigbench',
|
|
213
213
|
config_name=bigbench_discriminative_english - {"social_i_qa","intersect_geometry"} # english multiple choice tasks, minus duplicates
|
|
214
214
|
)
|
|
215
|
+
#"goal_step_wikihow"
|
|
215
216
|
|
|
216
217
|
blimp_hard = MultipleChoice(inputs=constant(''),
|
|
217
218
|
choices=['sentence_good','sentence_bad'],
|
|
@@ -367,7 +368,7 @@ turingbench = Classification("Generation",labels="label",
|
|
|
367
368
|
|
|
368
369
|
trec = Classification(sentence1="text", labels="fine_label")
|
|
369
370
|
|
|
370
|
-
tals_vitaminc = Classification('claim','evidence','label', dataset_name="tals/vitaminc"
|
|
371
|
+
tals_vitaminc = Classification('claim','evidence','label', dataset_name="tals/vitaminc")
|
|
371
372
|
|
|
372
373
|
hope_edi = Classification("text", labels="label", splits=["train", "validation", None], config_name=["english"])
|
|
373
374
|
|
|
@@ -426,8 +427,6 @@ silicone = Classification("Utterance",labels="Label",
|
|
|
426
427
|
config_name=['dyda_da', 'dyda_e', 'iemocap', 'maptask', 'meld_e', 'meld_s', 'oasis', 'sem'] # +['swda', 'mrda'] # in pragmeval
|
|
427
428
|
)
|
|
428
429
|
|
|
429
|
-
#lex_glue___ecthr_a = Classification(sentence1="text", labels="labels") # too long
|
|
430
|
-
#lex_glue___ecthr_b = Classification(sentence1="text", labels="labels") # too long
|
|
431
430
|
lex_glue___eurlex = Classification(sentence1="text", labels="labels")
|
|
432
431
|
lex_glue___scotus = Classification(sentence1="text", labels="label")
|
|
433
432
|
lex_glue___ledgar = Classification(sentence1="text", labels="label")
|
|
@@ -485,7 +484,11 @@ stackoverflow_questions=Classification("title","body",labels="label",
|
|
|
485
484
|
|
|
486
485
|
#hyperpartisan_news_detection___byarticle = Classification(sentence1="text", labels="hyperpartisan", splits=["train", None, None]) # files too heavy
|
|
487
486
|
#hyperpartisan_news_detection___bypublisher = Classification(sentence1="text", labels="hyperpartisan", splits=["train","validation", None]) # files too heavy
|
|
488
|
-
|
|
487
|
+
|
|
488
|
+
hyperpartisan_news = Classification(
|
|
489
|
+
"text",
|
|
490
|
+
labels=lambda x: {'true':'hyperpartisan','false':'not_hyperpartisan'}.get(x["label"]),
|
|
491
|
+
dataset_name="zapsdcn/hyperpartisan_news")
|
|
489
492
|
|
|
490
493
|
scierc = Classification("text",labels="label",dataset_name="zapsdcn/sciie")
|
|
491
494
|
citation_intent = Classification("text",labels="label",dataset_name="zapsdcn/citation_intent")
|
|
@@ -508,7 +511,7 @@ relbert_lexical_relation_classification = Classification(sentence1="head", sente
|
|
|
508
511
|
config_name=["BLESS","CogALexV","EVALution","K&H+N","ROOT09"])
|
|
509
512
|
|
|
510
513
|
|
|
511
|
-
|
|
514
|
+
linguisticprobing = Classification("sentence", labels="label", dataset_name="tasksource/linguisticprobing",
|
|
512
515
|
config_name=['subj_number',
|
|
513
516
|
'obj_number',
|
|
514
517
|
'past_present',
|
|
@@ -635,7 +638,7 @@ quarel = Classification(
|
|
|
635
638
|
labels=lambda x: "AB"[x["answer_index"]]
|
|
636
639
|
)
|
|
637
640
|
|
|
638
|
-
mwong_fever_evidence_related = Classification(sentence1="claim", sentence2="evidence", labels="labels", splits=["train", "valid", "test"], dataset_name="mwong/fever-evidence-related"
|
|
641
|
+
mwong_fever_evidence_related = Classification(sentence1="claim", sentence2="evidence", labels="labels", splits=["train", "valid", "test"], dataset_name="mwong/fever-evidence-related")
|
|
639
642
|
|
|
640
643
|
numer_sense = Classification("sentence",labels="target",splits=["train",None,None])
|
|
641
644
|
|
|
@@ -649,7 +652,9 @@ sarcasm_news = Classification("headline", labels="is_sarcastic",
|
|
|
649
652
|
|
|
650
653
|
sem_eval_2010_task_8 = Classification("sentence",labels="relation")
|
|
651
654
|
|
|
652
|
-
|
|
655
|
+
auditor_review = Classification(sentence1="sentence",
|
|
656
|
+
labels=name("label",['negative','neutral','positive']),
|
|
657
|
+
dataset_name="demo-org/auditor_review")
|
|
653
658
|
|
|
654
659
|
medmcqa = MultipleChoice("question", choices=regen('op[a-d]'),labels='cop')
|
|
655
660
|
|
|
@@ -677,9 +682,9 @@ logiqa = MultipleChoice(
|
|
|
677
682
|
wiki_qa = Classification("question","answer", name("label",['False','True']))
|
|
678
683
|
|
|
679
684
|
cycic_classification = Classification("question",labels=name("correct_answer",['False','True']),
|
|
680
|
-
dataset_name = "
|
|
685
|
+
dataset_name = "tasksource/cycic_classification")
|
|
681
686
|
cycic_mc = MultipleChoice("question", choices=regen('answer\_option[0-4]'), labels="correct_answer",
|
|
682
|
-
dataset_name = "
|
|
687
|
+
dataset_name = "tasksource/cycic_multiplechoice")
|
|
683
688
|
|
|
684
689
|
|
|
685
690
|
def _preprocess_chatgpt_detection(ex):
|
|
@@ -694,24 +699,24 @@ def _preprocess_chatgpt_detection(ex):
|
|
|
694
699
|
# pre_process=lambda dataset:dataset.map(_preprocess_chatgpt_detection))
|
|
695
700
|
|
|
696
701
|
sts_companion = Classification("sentence1","sentence2","label",
|
|
697
|
-
dataset_name="
|
|
702
|
+
dataset_name="tasksource/sts-companion")
|
|
698
703
|
|
|
699
704
|
commonsense_qa_2 = Classification("question",labels="answer",
|
|
700
|
-
dataset_name="
|
|
705
|
+
dataset_name="tasksource/commonsense_qa_2.0")
|
|
701
706
|
|
|
702
|
-
ling_nli = Classification("premise","hypothesis","label",dataset_name="
|
|
707
|
+
ling_nli = Classification("premise","hypothesis","label",dataset_name="tasksource/lingnli")
|
|
703
708
|
|
|
704
709
|
monotonicity_entailment = Classification("sentence1", "sentence2", "gold_label",
|
|
705
|
-
dataset_name="
|
|
710
|
+
dataset_name="tasksource/monotonicity-entailment")
|
|
706
711
|
|
|
707
712
|
arct = MultipleChoice(cat(["reason","claim"]),choices=["warrant0","warrant1"],
|
|
708
|
-
labels="correctLabelW0orW1", dataset_name="
|
|
713
|
+
labels="correctLabelW0orW1", dataset_name="tasksource/arct")
|
|
709
714
|
|
|
710
715
|
scinli = Classification("sentence1", "sentence2", labels="label",
|
|
711
716
|
post_process=lambda x:x.shuffle(seed=0),
|
|
712
|
-
dataset_name="
|
|
717
|
+
dataset_name="tasksource/scinli")
|
|
713
718
|
|
|
714
|
-
naturallogic = Classification(" sent1 "," sent2 "," new_label ",dataset_name="
|
|
719
|
+
naturallogic = Classification(" sent1 "," sent2 "," new_label ",dataset_name="tasksource/naturallogic")
|
|
715
720
|
|
|
716
721
|
onestop_qa = MultipleChoice(cat(["paragraph","question"]),choices_list="answers",
|
|
717
722
|
labels=constant(0))
|
|
@@ -727,7 +732,7 @@ dyna_hate = Classification("text",labels="label",dataset_name="aps/dynahate",spl
|
|
|
727
732
|
|
|
728
733
|
syntactic_augmentation_nli = Classification('sentence1',"sentence2","gold_label",dataset_name="metaeval/syntactic-augmentation-nli")
|
|
729
734
|
|
|
730
|
-
autotnli = Classification("premises", "hypothesis", "label", dataset_name="
|
|
735
|
+
autotnli = Classification("premises", "hypothesis", "label", dataset_name="tasksource/autotnli")
|
|
731
736
|
#equate = Classification("sentence1", "sentence2", "gold_label",dataset_name="metaeval/equate")
|
|
732
737
|
|
|
733
738
|
conqada = Classification("sentence1","sentence2","label",dataset_name="lasha-nlp/CONDAQA",
|
|
@@ -747,9 +752,9 @@ wouldyourather = MultipleChoice(constant('Most people would rather:'), choices=[
|
|
|
747
752
|
labels= lambda x: int(x['votes_a']<x['votes_b']),
|
|
748
753
|
dataset_name="metaeval/wouldyourather")
|
|
749
754
|
|
|
750
|
-
attempto_nli = Classification("premise","hypothesis",
|
|
751
|
-
lambda x:f'race-{x["race_label"]}',
|
|
752
|
-
dataset_name="sileod/attempto-nli")
|
|
755
|
+
#attempto_nli = Classification("premise","hypothesis",
|
|
756
|
+
# lambda x:f'race-{x["race_label"]}',
|
|
757
|
+
# dataset_name="sileod/attempto-nli")
|
|
753
758
|
|
|
754
759
|
defeasible_nli = Classification(cat(["Premise","Hypothesis"]),"Update",labels="UpdateType",
|
|
755
760
|
dataset_name="metaeval/defeasible-nli",config_name=['atomic', 'snli'])
|
|
@@ -758,25 +763,22 @@ defeasible_nli = Classification(cat(["Premise","Hypothesis"]),"Update",labels="U
|
|
|
758
763
|
# dataset_name="metaeval/defeasible-nli",config_name='social')
|
|
759
764
|
|
|
760
765
|
help_nli = Classification("ori_sentence","new_sentence","gold_label",
|
|
761
|
-
dataset_name="
|
|
766
|
+
dataset_name="tasksource/help-nli")
|
|
762
767
|
|
|
763
768
|
nli_veridicality_transitivity = Classification("sentence1","sentence2","gold_label",
|
|
764
769
|
dataset_name="metaeval/nli-veridicality-transitivity")
|
|
765
770
|
|
|
766
|
-
nl_satisfiability= Classification("sentence",labels="label",
|
|
767
|
-
dataset_name="metaeval/natural-language-satisfiability")
|
|
768
|
-
|
|
769
771
|
lonli = Classification("premise","hypothesis","label",
|
|
770
|
-
dataset_name="
|
|
772
|
+
dataset_name="tasksource/lonli")
|
|
771
773
|
|
|
772
774
|
dadc_limit = Classification("sentence1","sentence2","label",
|
|
773
|
-
dataset_name="
|
|
775
|
+
dataset_name="tasksource/dadc-limit-nli")
|
|
774
776
|
|
|
775
777
|
flute = Classification("premise","hypothesis","label",
|
|
776
778
|
dataset_name="ColumbiaNLP/FLUTE")
|
|
777
779
|
|
|
778
780
|
strategy_qa = Classification('question',labels='answer',
|
|
779
|
-
dataset_name="
|
|
781
|
+
dataset_name="tasksource/strategy-qa",splits=['train',None,None])
|
|
780
782
|
|
|
781
783
|
summarize_from_feedback = MultipleChoice(get.info.post,
|
|
782
784
|
choices_list=lambda x: [x['summaries'][0]['text'],x['summaries'][1]['text']],
|
|
@@ -790,10 +792,10 @@ folio = Classification("premises","conclusion",
|
|
|
790
792
|
dataset_name="tasksource/folio")
|
|
791
793
|
|
|
792
794
|
tomi_nli = Classification("premise","hypothesis","label",
|
|
793
|
-
dataset_name="
|
|
795
|
+
dataset_name="tasksource/tomi-nli")
|
|
794
796
|
|
|
795
797
|
avicenna = Classification("Premise 1","Premise 2","Syllogistic relation",
|
|
796
|
-
dataset_name="
|
|
798
|
+
dataset_name="tasksource/avicenna")
|
|
797
799
|
|
|
798
800
|
shp = MultipleChoice("history",
|
|
799
801
|
choices=['human_ref_A','human_ref_B'],
|
|
@@ -816,7 +818,7 @@ creak = Classification("sentence",labels="label",
|
|
|
816
818
|
|
|
817
819
|
mutual = MultipleChoice("article",choices_list="options",
|
|
818
820
|
labels=lambda x: "ABCD".index(x['answers']),
|
|
819
|
-
dataset_name="
|
|
821
|
+
dataset_name="tasksource/mutual",splits=["train",None,None])
|
|
820
822
|
|
|
821
823
|
neqa = MultipleChoice('prompt',choices_list='classes',labels="answer_index",
|
|
822
824
|
dataset_name="inverse-scaling/NeQA")
|
|
@@ -826,35 +828,35 @@ redefine_math = MultipleChoice('prompt',choices_list='classes',labels="answer_in
|
|
|
826
828
|
dataset_name="inverse-scaling/redefine-math")
|
|
827
829
|
|
|
828
830
|
puzzte = Classification("puzzle_text","question","answer",
|
|
829
|
-
dataset_name="
|
|
831
|
+
dataset_name="tasksource/puzzte")
|
|
830
832
|
|
|
831
833
|
implicatures = MultipleChoice(cat(['context','response'],"\n"),
|
|
832
834
|
choices=['correct_implicature','incorrect_implicature'],
|
|
833
835
|
labels=constant(0),
|
|
834
|
-
dataset_name='
|
|
836
|
+
dataset_name='tasksource/implicatures')
|
|
835
837
|
|
|
836
838
|
race = MultipleChoice(cat(['question','article'],'\n'), choices_list='options',
|
|
837
839
|
labels=lambda x:'ABCDE'.index(x['answer']),
|
|
838
840
|
config_name=['middle','high'])
|
|
839
841
|
|
|
840
842
|
race_c = MultipleChoice(cat(['question','article'],'\n'),choices_list='option',labels='label',
|
|
841
|
-
dataset_name='
|
|
843
|
+
dataset_name='tasksource/race-c')
|
|
842
844
|
|
|
843
845
|
spartqa_yn=Classification("story","question","answer",
|
|
844
|
-
dataset_name="
|
|
846
|
+
dataset_name="tasksource/spartqa-yn")
|
|
845
847
|
|
|
846
848
|
spartqa_mc=MultipleChoice(cat(["story","question"]),choices_list="candidate_answers",labels="answer",
|
|
847
|
-
dataset_name="
|
|
849
|
+
dataset_name="tasksource/spartqa-mchoice")
|
|
848
850
|
|
|
849
851
|
temporal_nli = Classification("Premise","Hypothesis","Label",
|
|
850
|
-
dataset_name="
|
|
852
|
+
dataset_name="tasksource/temporal-nli")
|
|
851
853
|
|
|
852
854
|
riddle_sense = MultipleChoice("question", choices_list=get.choices.text,
|
|
853
855
|
labels=lambda x : "ABCDE".index(x['answerKey']))
|
|
854
856
|
|
|
855
857
|
clcd = Classification(
|
|
856
858
|
"sentence1","sentence2","label",
|
|
857
|
-
dataset_name="
|
|
859
|
+
dataset_name="tasksource/clcd-english")
|
|
858
860
|
|
|
859
861
|
twentyquestions = Classification("question","subject","answer",dataset_name="maximedb/twentyquestions")
|
|
860
862
|
|
|
@@ -862,16 +864,16 @@ reclor = MultipleChoice(cat(["context","question"]),choices_list="answers",label
|
|
|
862
864
|
dataset_name="metaeval/reclor",splits=['train','validation',None])
|
|
863
865
|
|
|
864
866
|
c_aug_imdb = Classification("Text",labels="Sentiment",
|
|
865
|
-
dataset_name='
|
|
867
|
+
dataset_name='tasksource/counterfactually-augmented-imdb')
|
|
866
868
|
|
|
867
869
|
c_aug_snli = Classification("sentence1","sentence2","gold_label",
|
|
868
|
-
dataset_name='
|
|
870
|
+
dataset_name='tasksource/counterfactually-augmented-snli')
|
|
869
871
|
|
|
870
872
|
cnli = Classification("premise","hypothesis","label",
|
|
871
873
|
dataset_name='metaeval/cnli')
|
|
872
874
|
|
|
873
875
|
perturbed_boolq = Classification("question",labels="hard_label",
|
|
874
|
-
dataset_name='
|
|
876
|
+
dataset_name='tasksource/boolq-natural-perturbations')
|
|
875
877
|
|
|
876
878
|
#mega_acceptability = Classification("sentence",labels="average",
|
|
877
879
|
# dataset_name='metaeval/mega-acceptability-v2')
|
|
@@ -883,14 +885,14 @@ equate = Classification("sentence1","sentence2","gold_label",
|
|
|
883
885
|
dataset_name='metaeval/equate')
|
|
884
886
|
|
|
885
887
|
science_qa = MultipleChoice("question",choices_list="choices",labels="answer",
|
|
886
|
-
dataset_name="
|
|
888
|
+
dataset_name="tasksource/ScienceQA_text_only")
|
|
887
889
|
|
|
888
890
|
ekar=MultipleChoice("question",choices_list=get.choices.text,
|
|
889
891
|
labels=lambda x:"ABCD".index(x['answerKey']),
|
|
890
892
|
dataset_name="Jiangjie/ekar_english")
|
|
891
893
|
|
|
892
894
|
implicit_hate = Classification("post",labels="class",
|
|
893
|
-
dataset_name="
|
|
895
|
+
dataset_name="tasksource/implicit-hate-stg1")
|
|
894
896
|
|
|
895
897
|
nli_unambiguity = Classification("premise","hypothesis","gini",
|
|
896
898
|
dataset_name="metaeval/chaos-mnli-ambiguity")
|
|
@@ -898,7 +900,7 @@ nli_unambiguity = Classification("premise","hypothesis","gini",
|
|
|
898
900
|
headline_cause = Classification('left_title','right_title','label',
|
|
899
901
|
dataset_name='IlyaGusev/headline_cause',config_name='en_simple')
|
|
900
902
|
|
|
901
|
-
logiqa_2 = Classification("premise","hypothesis","label",dataset_name="
|
|
903
|
+
logiqa_2 = Classification("premise","hypothesis","label",dataset_name="tasksource/logiqa-2.0-nli")
|
|
902
904
|
|
|
903
905
|
_oasst = dict(dataset_name="tasksource/oasst2_dense_flat",
|
|
904
906
|
pre_process = lambda ds:ds.filter(lambda x:x['lang']=='en'))
|
|
@@ -907,7 +909,6 @@ oasst1__quality = Classification("parent_text","text",labels="quality",**_oasst)
|
|
|
907
909
|
oasst1__toxicity = Classification("parent_text","text",labels="toxicity",**_oasst)
|
|
908
910
|
oasst1__helpfulness = Classification("parent_text","text",labels="helpfulness",**_oasst)
|
|
909
911
|
|
|
910
|
-
|
|
911
912
|
mindgames = Classification("premise","hypothesis","label",dataset_name="sileod/mindgames")
|
|
912
913
|
|
|
913
914
|
def _udep_post_process(ds):
|
|
@@ -956,6 +957,7 @@ winowhy = Classification('sentence', lambda x: f'In "{x["wnli_sent1"]}", {x["wnl
|
|
|
956
957
|
#for CFG in "cognitive-bias", "fake-news", "gender-bias", "hate-speech", "linguistic-bias", "political-bias", "racial-bias", "text-level-bias":
|
|
957
958
|
# print(f"mbib__{CFG.replace('-','_')} = Classification('text',labels=name('label',['not {CFG}','{CFG}']), dataset_name='mediabiasgroup/mbib-base', config_name='{CFG}')")
|
|
958
959
|
|
|
960
|
+
"""
|
|
959
961
|
mbib_cognitive_bias = Classification('text',labels=name('label',['not cognitive-bias','cognitive-bias']), dataset_name='mediabiasgroup/mbib-base', config_name='cognitive-bias')
|
|
960
962
|
mbib_fake_news = Classification('text',labels=name('label',['not fake-news','fake-news']), dataset_name='mediabiasgroup/mbib-base', config_name='fake-news')
|
|
961
963
|
mbib_gender_bias = Classification('text',labels=name('label',['not gender-bias','gender-bias']), dataset_name='mediabiasgroup/mbib-base', config_name='gender-bias')
|
|
@@ -964,6 +966,7 @@ mbib_linguistic_bias = Classification('text',labels=name('label',['not linguisti
|
|
|
964
966
|
mbib_political_bias = Classification('text',labels=name('label',['not political-bias','political-bias']), dataset_name='mediabiasgroup/mbib-base', config_name='political-bias')
|
|
965
967
|
mbib_racial_bias = Classification('text',labels=name('label',['not racial-bias','racial-bias']), dataset_name='mediabiasgroup/mbib-base', config_name='racial-bias')
|
|
966
968
|
mbib_text_level_bias = Classification('text',labels=name('label',['not text-level-bias','text-level-bias']), dataset_name='mediabiasgroup/mbib-base', config_name='text-level-bias')
|
|
969
|
+
"""
|
|
967
970
|
|
|
968
971
|
robustLR = Classification("context","statement","label", dataset_name="tasksource/robustLR")
|
|
969
972
|
|
|
@@ -1026,7 +1029,7 @@ def _icl_rand(x):
|
|
|
1026
1029
|
icl = Classification("inputs", lambda x: x['symbols'][_icl_rand(x)],
|
|
1027
1030
|
labels=lambda x: str(x['symbols'][_icl_rand(x)]==x['targets']),
|
|
1028
1031
|
dataset_name="tasksource/icl-symbol-tuning-instruct",
|
|
1029
|
-
pre_process=lambda ds:ds.filter(lambda x:len(x['inputs'])<
|
|
1032
|
+
pre_process=lambda ds:ds.filter(lambda x:len(x['inputs'])<500*4), # 500 tokens of 4 char
|
|
1030
1033
|
)
|
|
1031
1034
|
|
|
1032
1035
|
space_nli = Classification("premises","hypothesis","label",dataset_name="tasksource/SpaceNLI")
|
|
@@ -1144,9 +1147,11 @@ nope = Classification('premise','hypothesis',
|
|
|
1144
1147
|
|
|
1145
1148
|
logicNLI = Classification('premise','hypothesis','label',dataset_name='tasksource/LogicNLI')
|
|
1146
1149
|
|
|
1147
|
-
|
|
1150
|
+
contract_nli__seg = Classification("premise","hypothesis","label", dataset_name="kiddothe2b/contract-nli",config_name="contractnli_a")
|
|
1148
1151
|
|
|
1149
|
-
|
|
1152
|
+
contract_nli__full = Classification("premise","hypothesis","label", dataset_name="kiddothe2b/contract-nli",config_name="contractnli_b")
|
|
1153
|
+
|
|
1154
|
+
nli4ct = Classification(lambda x: "\n".join(x['Primary_evidence']),'Statement',"Label",
|
|
1150
1155
|
dataset_name="AshtonIsNotHere/nli4ct_semeval2024",splits=['train','dev',None])
|
|
1151
1156
|
|
|
1152
1157
|
lsat_ar = MultipleChoice(
|
|
@@ -1196,16 +1201,78 @@ ambigNQ = Classification("question",labels=lambda x:{True:"ambiguous", False:"no
|
|
|
1196
1201
|
|
|
1197
1202
|
siga_nli = Classification("premise","statement","label",dataset_name="tasksource/SIGA-nli")
|
|
1198
1203
|
|
|
1199
|
-
|
|
1204
|
+
unigram_fol = Classification("premise","hypothesis","label",dataset_name='unigram/FOL-nli')
|
|
1200
1205
|
|
|
1201
|
-
gs_goal = MultipleChoice("sent2",regen("ending[0-3]"),"label",
|
|
1202
|
-
dataset_name="tasksource/goal-step-wikihow",config_name="goal")
|
|
1206
|
+
#gs_goal = MultipleChoice("sent2",regen("ending[0-3]"),"label",
|
|
1207
|
+
# dataset_name="tasksource/goal-step-wikihow",config_name="goal")
|
|
1203
1208
|
|
|
1204
|
-
gs_step = MultipleChoice("sent2",regen("ending[0-3]"),"label",
|
|
1205
|
-
dataset_name="tasksource/goal-step-wikihow",config_name="step")
|
|
1209
|
+
#gs_step = MultipleChoice("sent2",regen("ending[0-3]"),"label",
|
|
1210
|
+
# dataset_name="tasksource/goal-step-wikihow",config_name="step")
|
|
1206
1211
|
|
|
1207
1212
|
gs_order = MultipleChoice("sent2",regen("ending[0-1]"),"label",
|
|
1208
1213
|
dataset_name="tasksource/goal-step-wikihow",config_name="order")
|
|
1209
1214
|
|
|
1210
|
-
paradise = MultipleChoice("sent2",regen("ending[0-
|
|
1215
|
+
paradise = MultipleChoice("sent2",regen("ending[0-3]"),"label",
|
|
1211
1216
|
dataset_name="GGLab/PARADISE")
|
|
1217
|
+
|
|
1218
|
+
docnli = Classification("premise","hypothesis","label",dataset_name="tasksource/doc-nli")
|
|
1219
|
+
|
|
1220
|
+
mctest_nli = Classification("premise","hypothesis","label",dataset_name="tasksource/mctest-nli")
|
|
1221
|
+
|
|
1222
|
+
patent_phrase_similarity = Classification("anchor","target","label",dataset_name="tasksource/patent-phrase-similarity")
|
|
1223
|
+
|
|
1224
|
+
nlsat = Classification('sentence',labels='label',dataset_name="tasksource/natural-language-satisfiability")
|
|
1225
|
+
|
|
1226
|
+
idioms_nli = Classification('premise','hypothesis','label',dataset_name="tasksource/idioms-nli")
|
|
1227
|
+
|
|
1228
|
+
lifeycle_entailment = Classification("premise","hypothesis","label",dataset_name='tasksource/lifecycle-entailment')
|
|
1229
|
+
|
|
1230
|
+
|
|
1231
|
+
helpsteer__helpfulness = Classification("prompt", "response", "helpfulness", dataset_name="nvidia/HelpSteer")
|
|
1232
|
+
helpsteer__correctness = Classification("prompt", "response", "correctness", dataset_name="nvidia/HelpSteer")
|
|
1233
|
+
helpsteer__coherence = Classification("prompt", "response", "coherence", dataset_name="nvidia/HelpSteer")
|
|
1234
|
+
helpsteer__complexity = Classification("prompt", "response", "complexity", dataset_name="nvidia/HelpSteer")
|
|
1235
|
+
helpsteer__verbosity = Classification("prompt", "response", "verbosity", dataset_name="nvidia/HelpSteer")
|
|
1236
|
+
|
|
1237
|
+
helpsteer_2__helpfulness = Classification("prompt","response","helpfulness",dataset_name="nvidia/HelpSteer2")
|
|
1238
|
+
helpsteer_2__correctness = Classification("prompt", "response", "correctness", dataset_name="nvidia/HelpSteer2")
|
|
1239
|
+
helpsteer_2__coherence = Classification("prompt", "response", "coherence", dataset_name="nvidia/HelpSteer2")
|
|
1240
|
+
helpsteer_2__complexity = Classification("prompt", "response", "complexity", dataset_name="nvidia/HelpSteer2")
|
|
1241
|
+
helpsteer_2__verbosity = Classification("prompt", "response", "verbosity", dataset_name="nvidia/HelpSteer2")
|
|
1242
|
+
|
|
1243
|
+
msci_nli = Classification('sentence1','sentence2','label',dataset_name='sadat2307/MSciNLI')
|
|
1244
|
+
|
|
1245
|
+
#lex_glue___ecthr_a = Classification(sentence1="text", labels="labels",dataset_name="coastalcph/lex_glue",config_name="ecthr_a") # too long
|
|
1246
|
+
#lex_glue___ecthr_b = Classification(sentence1="text", labels="labels") # too long
|
|
1247
|
+
|
|
1248
|
+
ultrafeedback = MultipleChoice("question", choices=['response_j','response_k'],labels=constant(0), dataset_name="pushpdeep/UltraFeedback-paired")
|
|
1249
|
+
|
|
1250
|
+
essay_scoring = Classification("full_text",labels="score",dataset_name='tasksource/AES2-essay-scoring')
|
|
1251
|
+
|
|
1252
|
+
#argument_feedback = Classification("discourse_text",labels="discourse_effectiveness", dataset_name="tasksource/argument-feedback")
|
|
1253
|
+
|
|
1254
|
+
eg = lambda x: Classification("full_text", labels=lambda y:int(y[x]), dataset_name="tasksource/english-grading")
|
|
1255
|
+
grading__cohesion = eg('cohesion')
|
|
1256
|
+
grading__syntax = eg('syntax')
|
|
1257
|
+
grading__vocabulary = eg('vocabulary')
|
|
1258
|
+
grading__phraseology = eg('phraseology')
|
|
1259
|
+
grading__grammar = eg('grammar')
|
|
1260
|
+
grading__conventions = eg('conventions')
|
|
1261
|
+
|
|
1262
|
+
wice = Classification(lambda x: "\n".join(x['evidence']),'claim','label',
|
|
1263
|
+
dataset_name='tasksource/wice')
|
|
1264
|
+
|
|
1265
|
+
hover = Classification("evidence","claim","label",
|
|
1266
|
+
dataset_name="Dzeniks/hover")
|
|
1267
|
+
|
|
1268
|
+
hover__nli = Classification("evidence","claim",name("label",["entailment","neutral","contradiction"]),
|
|
1269
|
+
dataset_name="Dzeniks/hover-3way")
|
|
1270
|
+
|
|
1271
|
+
tasksource_dpo = MultipleChoice("prompt",choices=['chosen','rejected'],labels=constant(0),
|
|
1272
|
+
dataset_name="tasksource/tasksource_dpo_pairs")
|
|
1273
|
+
|
|
1274
|
+
seahorse = Classification('article',cat(["summary", "question"]),'answer',
|
|
1275
|
+
dataset_name="tasksource/seahorse_summarization_evaluation")
|
|
1276
|
+
|
|
1277
|
+
mip = Classification("prompt",labels="y",
|
|
1278
|
+
dataset_name="sileod/missing-item-prediction",config_name="contrastive")
|