Spaces:
Runtime error
Runtime error
pminervini
commited on
Commit
•
6dfea56
1
Parent(s):
6f3b005
update
Browse files
src/backend/tasks/cnndm/task.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
from lm_eval.api.task import
|
2 |
from lm_eval.api.instance import Instance
|
3 |
-
from lm_eval.api.registry import register_task
|
4 |
from lm_eval.api.metrics import mean
|
5 |
|
6 |
import torch
|
@@ -60,7 +60,7 @@ def rouge(refs, preds):
|
|
60 |
|
61 |
|
62 |
# @register_task("cnndm")
|
63 |
-
class CNNDM(
|
64 |
VERSION = 0
|
65 |
DATASET_PATH = "cnn_dailymail"
|
66 |
DATASET_NAME = "3.0.0"
|
|
|
1 |
+
from lm_eval.api.task import ConfigurableTask
|
2 |
from lm_eval.api.instance import Instance
|
3 |
+
# from lm_eval.api.registry import register_task
|
4 |
from lm_eval.api.metrics import mean
|
5 |
|
6 |
import torch
|
|
|
60 |
|
61 |
|
62 |
# @register_task("cnndm")
|
63 |
+
class CNNDM(ConfigurableTask):
|
64 |
VERSION = 0
|
65 |
DATASET_PATH = "cnn_dailymail"
|
66 |
DATASET_NAME = "3.0.0"
|
src/backend/tasks/cnndm/task_v2.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
from lm_eval.api.task import
|
2 |
from lm_eval.api.instance import Instance
|
3 |
-
from lm_eval.api.registry import register_task
|
4 |
from lm_eval.api.metrics import mean
|
5 |
|
6 |
import torch
|
@@ -60,7 +60,7 @@ def rouge(refs, preds):
|
|
60 |
|
61 |
|
62 |
# @register_task("cnndm_v2")
|
63 |
-
class CNNDMv2(
|
64 |
VERSION = 0
|
65 |
DATASET_PATH = "cnn_dailymail"
|
66 |
DATASET_NAME = "3.0.0"
|
|
|
1 |
+
from lm_eval.api.task import ConfigurableTask
|
2 |
from lm_eval.api.instance import Instance
|
3 |
+
# from lm_eval.api.registry import register_task
|
4 |
from lm_eval.api.metrics import mean
|
5 |
|
6 |
import torch
|
|
|
60 |
|
61 |
|
62 |
# @register_task("cnndm_v2")
|
63 |
+
class CNNDMv2(ConfigurableTask):
|
64 |
VERSION = 0
|
65 |
DATASET_PATH = "cnn_dailymail"
|
66 |
DATASET_NAME = "3.0.0"
|
src/backend/tasks/selfcheckgpt/task.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
import os
|
2 |
from typing import Union, List
|
3 |
|
4 |
-
from lm_eval.api.task import
|
5 |
from lm_eval.api.instance import Instance
|
6 |
-
from lm_eval.api.registry import register_task
|
7 |
from lm_eval.api.metrics import mean
|
8 |
|
9 |
from src.backend.envs import DEVICE
|
@@ -13,7 +13,7 @@ from selfcheckgpt.modeling_selfcheck import SelfCheckMQAG, SelfCheckNLI, SelfChe
|
|
13 |
|
14 |
|
15 |
# @register_task("selfcheckgpt")
|
16 |
-
class SelfCheckGPT(
|
17 |
VERSION = 0.0
|
18 |
DATASET_PATH = "potsawee/wiki_bio_gpt3_hallucination"
|
19 |
DATASET_NAME = None
|
|
|
1 |
import os
|
2 |
from typing import Union, List
|
3 |
|
4 |
+
from lm_eval.api.task import ConfigurableTask
|
5 |
from lm_eval.api.instance import Instance
|
6 |
+
# from lm_eval.api.registry import register_task
|
7 |
from lm_eval.api.metrics import mean
|
8 |
|
9 |
from src.backend.envs import DEVICE
|
|
|
13 |
|
14 |
|
15 |
# @register_task("selfcheckgpt")
|
16 |
+
class SelfCheckGPT(ConfigurableTask):
|
17 |
VERSION = 0.0
|
18 |
DATASET_PATH = "potsawee/wiki_bio_gpt3_hallucination"
|
19 |
DATASET_NAME = None
|
src/backend/tasks/xsum/task.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
-
from lm_eval.api.task import
|
2 |
from lm_eval.api.instance import Instance
|
|
|
3 |
from lm_eval.api.metrics import mean
|
4 |
|
5 |
import torch
|
@@ -51,7 +52,7 @@ def rouge(refs, preds):
|
|
51 |
|
52 |
|
53 |
# @register_task("xsum")
|
54 |
-
class XSum(
|
55 |
VERSION = 0
|
56 |
DATASET_PATH = "EdinburghNLP/xsum"
|
57 |
DATASET_NAME = None
|
|
|
1 |
+
from lm_eval.api.task import ConfigurableTask
|
2 |
from lm_eval.api.instance import Instance
|
3 |
+
# from lm_eval.api.registry import register_task
|
4 |
from lm_eval.api.metrics import mean
|
5 |
|
6 |
import torch
|
|
|
52 |
|
53 |
|
54 |
# @register_task("xsum")
|
55 |
+
class XSum(ConfigurableTask):
|
56 |
VERSION = 0
|
57 |
DATASET_PATH = "EdinburghNLP/xsum"
|
58 |
DATASET_NAME = None
|
src/backend/tasks/xsum/task_v2.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
from lm_eval.api.task import ConfigurableTask
|
2 |
from lm_eval.api.instance import Instance
|
3 |
-
from lm_eval.api.registry import register_task
|
4 |
from lm_eval.api.metrics import mean
|
5 |
|
6 |
import torch
|
|
|
1 |
+
from lm_eval.api.task import ConfigurableTask
|
2 |
from lm_eval.api.instance import Instance
|
3 |
+
# from lm_eval.api.registry import register_task
|
4 |
from lm_eval.api.metrics import mean
|
5 |
|
6 |
import torch
|