lring3223 commited on
Commit
abd8b69
1 Parent(s): 77c5b40

Update hello.py

Browse files
Files changed (1) hide show
  1. hello.py +43 -1
hello.py CHANGED
@@ -1 +1,43 @@
1
- print("\n\nhello\n\n")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ print("\n\nhello\n\n")
2
+ import evaluate
3
+ from evaluate.evaluation_suite import SubTask
4
+
5
+
6
+ class Suite(evaluate.EvaluationSuite):
7
+
8
+ def __init__(self, name):
9
+ super().__init__(name)
10
+
11
+ self.preprocessor = lambda x: {"text": x["text"].lower()}
12
+ self.suite = [
13
+ SubTask(
14
+ task_type="text-classification",
15
+ data="imdb",
16
+ split="test[:10]",
17
+ data_preprocessor=self.preprocessor,
18
+ args_for_task={
19
+ "metric": "accuracy",
20
+ "input_column": "text",
21
+ "label_column": "label",
22
+ "label_mapping": {
23
+ "LABEL_0": 0.0,
24
+ "LABEL_1": 1.0
25
+ }
26
+ }
27
+ ),
28
+ SubTask(
29
+ task_type="text-classification",
30
+ data="sst2",
31
+ split="test[:10]",
32
+ data_preprocessor=lambda x: {"sentence": x["sentence"].lower()},
33
+ args_for_task={
34
+ "metric": "accuracy",
35
+ "input_column": "sentence",
36
+ "label_column": "label",
37
+ "label_mapping": {
38
+ "LABEL_0": 0.0,
39
+ "LABEL_1": 1.0
40
+ }
41
+ }
42
+ )
43
+ ]