Skip to content

Commit e0d2115

Browse files
committed
removed dependencies (bigbench library, tensorflow, protobuf)
1 parent 40ad476 commit e0d2115

File tree

3 files changed

+295
-289
lines changed

3 files changed

+295
-289
lines changed

src/tasksource/access.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from datasets import load_dataset
77
import funcy as fc
88
import os
9+
import copy
910
from sorcery import dict_of
1011

1112
def parse_var_name(s):
@@ -63,8 +64,8 @@ def dict_to_query(d=dict(), **kwargs):
6364
return '&'.join([f'`{k}`=="{v}"' for k,v in d.items()])
6465

6566
def load_preprocessing(tasks=tasks, **kwargs):
66-
y = task_df.query(dict_to_query(**kwargs)).iloc[0]
67-
preprocessing= getattr(tasks, y.preprocessing_name)
67+
y = task_df.copy().query(dict_to_query(**kwargs)).iloc[0]
68+
preprocessing= copy.deepcopy(getattr(tasks, y.preprocessing_name))
6869
for c in 'dataset_name','config_name':
6970
if not isinstance(getattr(preprocessing,c), str):
7071
setattr(preprocessing,c,getattr(y,c))

src/tasksource/tasks.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ def _imppres_post_process(ds,prefix=''):
181181
'inputs',
182182
choices_list='multiple_choice_targets',
183183
labels=lambda x:x['multiple_choice_scores'].index(1) if 1 in ['multiple_choice_scores'] else -1,
184+
dataset_name='tasksource/bigbench',
184185
config_name=bigbench_discriminative_english - {"social_i_qa","intersect_geometry"} # english multiple choice tasks, minus duplicates
185186
)
186187

@@ -715,4 +716,8 @@ def _preprocess_chatgpt_detection(ex):
715716

716717

717718
#autotnli = Classification("premises", "hypothesis", "label", dataset_name="metaeval/autotnli")
718-
#equate = Classification("sentence1", "sentence2", "gold_label",dataset_name="metaeval/equate")
719+
#equate = Classification("sentence1", "sentence2", "gold_label",dataset_name="metaeval/equate")
720+
721+
conqada = Classification("sentence1","sentence2","label",dataset_name="lasha-nlp/CONDAQA",
722+
pre_process = lambda ds:ds.filter(lambda x:x['label'] in {"DON'T KNOW","YES","NO"})
723+
)

0 commit comments

Comments
 (0)