mathemakitten
commited on
Commit
•
3e09f89
1
Parent(s):
e3ff21d
init
Browse files- glue-suite-v2.py +34 -0
glue-suite-v2.py
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from evaluate.evaluation_suite import SubTask
|
2 |
+
|
3 |
+
preprocessor = lambda x: x["text"].lower()
|
4 |
+
|
5 |
+
suite = [
|
6 |
+
SubTask(
|
7 |
+
data="imdb",
|
8 |
+
split="test",
|
9 |
+
data_preprocessor=preprocessor,
|
10 |
+
args_for_task={
|
11 |
+
"metric": "accuracy",
|
12 |
+
"input_column": "text",
|
13 |
+
"label_column": "label",
|
14 |
+
"label_mapping": {
|
15 |
+
"LABEL_0": 0.0,
|
16 |
+
"LABEL_1": 1.0
|
17 |
+
}
|
18 |
+
}
|
19 |
+
),
|
20 |
+
SubTask(
|
21 |
+
data="sst2",
|
22 |
+
split="test[:10]",
|
23 |
+
data_preprocessor=preprocessor,
|
24 |
+
args_for_task={
|
25 |
+
"metric": "accuracy",
|
26 |
+
"input_column": "sentence",
|
27 |
+
"label_column": "label",
|
28 |
+
"label_mapping": {
|
29 |
+
"LABEL_0": 0.0,
|
30 |
+
"LABEL_1": 1.0
|
31 |
+
}
|
32 |
+
}
|
33 |
+
)
|
34 |
+
]
|