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