Spaces:
Running
Running
Commit
·
32cfbbc
1
Parent(s):
72b6360
ahhhh
Browse files- glue-suite-v2.py +31 -29
glue-suite-v2.py
CHANGED
@@ -11,34 +11,36 @@ class Suite(evaluate.EvaluationSuite):
|
|
11 |
description="dummy metric for tests",
|
12 |
citation="insert citation here",
|
13 |
features=Features({"predictions": Value("int64"), "references": Value("int64")}))
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
"
|
26 |
-
"
|
|
|
|
|
|
|
27 |
}
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
}
|
42 |
-
|
43 |
-
|
44 |
-
]
|
|
|
11 |
description="dummy metric for tests",
|
12 |
citation="insert citation here",
|
13 |
features=Features({"predictions": Value("int64"), "references": Value("int64")}))
|
14 |
+
|
15 |
+
def setup(self):
|
16 |
+
self.preprocessor = None #lambda x: x["text"].lower()
|
17 |
+
self.suite = [
|
18 |
+
SubTask(
|
19 |
+
data="imdb",
|
20 |
+
split="test",
|
21 |
+
data_preprocessor=self.preprocessor,
|
22 |
+
args_for_task={
|
23 |
+
"metric": "accuracy",
|
24 |
+
"input_column": "text",
|
25 |
+
"label_column": "label",
|
26 |
+
"label_mapping": {
|
27 |
+
"LABEL_0": 0.0,
|
28 |
+
"LABEL_1": 1.0
|
29 |
+
}
|
30 |
}
|
31 |
+
),
|
32 |
+
SubTask(
|
33 |
+
data="sst2",
|
34 |
+
split="test[:10]",
|
35 |
+
data_preprocessor=self.preprocessor,
|
36 |
+
args_for_task={
|
37 |
+
"metric": "accuracy",
|
38 |
+
"input_column": "sentence",
|
39 |
+
"label_column": "label",
|
40 |
+
"label_mapping": {
|
41 |
+
"LABEL_0": 0.0,
|
42 |
+
"LABEL_1": 1.0
|
43 |
+
}
|
44 |
}
|
45 |
+
)
|
46 |
+
]
|
|