Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
pminervini
commited on
Commit
·
d4ef486
1
Parent(s):
3c8d224
update
Browse files
src/backend/tasks/cnndm/task_v2.py
CHANGED
@@ -61,12 +61,13 @@ def rouge(refs, preds):
|
|
61 |
|
62 |
# @register_task("cnndm_v2")
|
63 |
class CNNDMv2(ConfigurableTask):
|
64 |
-
VERSION =
|
65 |
DATASET_PATH = "cnn_dailymail"
|
66 |
DATASET_NAME = "3.0.0"
|
67 |
|
68 |
def __init__(self):
|
69 |
-
super().__init__(config={'metadata': {'version': self.VERSION}
|
|
|
70 |
self.factkb_tokenizer = None
|
71 |
self.factkb_model = None
|
72 |
self.bert_score = None
|
|
|
61 |
|
62 |
# @register_task("cnndm_v2")
|
63 |
class CNNDMv2(ConfigurableTask):
|
64 |
+
VERSION = 2
|
65 |
DATASET_PATH = "cnn_dailymail"
|
66 |
DATASET_NAME = "3.0.0"
|
67 |
|
68 |
def __init__(self):
|
69 |
+
super().__init__(config={'metadata': {'version': self.VERSION},
|
70 |
+
'generation_kwargs': {'do_sample': False, 'temperature': 0.0, 'until': ['\n', '\n\n']}})
|
71 |
self.factkb_tokenizer = None
|
72 |
self.factkb_model = None
|
73 |
self.bert_score = None
|
src/backend/tasks/xsum/task_v2.py
CHANGED
@@ -53,12 +53,14 @@ def rouge(refs, preds):
|
|
53 |
|
54 |
# @register_task("xsum_v2")
|
55 |
class XSumv2(ConfigurableTask):
|
56 |
-
VERSION =
|
57 |
DATASET_PATH = "EdinburghNLP/xsum"
|
58 |
DATASET_NAME = None
|
59 |
|
60 |
def __init__(self):
|
61 |
-
|
|
|
|
|
62 |
self.factkb_tokenizer = None
|
63 |
self.factkb_model = None
|
64 |
self.bert_score = None
|
|
|
53 |
|
54 |
# @register_task("xsum_v2")
|
55 |
class XSumv2(ConfigurableTask):
|
56 |
+
VERSION = 2
|
57 |
DATASET_PATH = "EdinburghNLP/xsum"
|
58 |
DATASET_NAME = None
|
59 |
|
60 |
def __init__(self):
|
61 |
+
# breakpoint()
|
62 |
+
super().__init__(config={'metadata': {'version': self.VERSION},
|
63 |
+
'generation_kwargs': {'do_sample': False, 'temperature': 0.0, 'until': ['\n', '\n\n']}})
|
64 |
self.factkb_tokenizer = None
|
65 |
self.factkb_model = None
|
66 |
self.bert_score = None
|