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