mathemakitten commited on
Commit
32cfbbc
1 Parent(s): 72b6360
Files changed (1) hide show
  1. 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
- preprocessor = None #lambda x: x["text"].lower()
15
- suite = [
16
- SubTask(
17
- data="imdb",
18
- split="test",
19
- data_preprocessor=preprocessor,
20
- args_for_task={
21
- "metric": "accuracy",
22
- "input_column": "text",
23
- "label_column": "label",
24
- "label_mapping": {
25
- "LABEL_0": 0.0,
26
- "LABEL_1": 1.0
 
 
 
27
  }
28
- }
29
- ),
30
- SubTask(
31
- data="sst2",
32
- split="test[:10]",
33
- data_preprocessor=preprocessor,
34
- args_for_task={
35
- "metric": "accuracy",
36
- "input_column": "sentence",
37
- "label_column": "label",
38
- "label_mapping": {
39
- "LABEL_0": 0.0,
40
- "LABEL_1": 1.0
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
+ ]