Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
•
a5f73fe
1
Parent(s):
750f3a2
Fix ModuleNotFoundError in custom_tasks (#17)
Browse files- Fix ModuleNotFoundError in custom_tasks (5e44420b1917e92c844c2bae447b5a7b09163bb1)
Co-authored-by: Albert Villanova del Moral <[email protected]>
- custom_tasks.py +3 -4
custom_tasks.py
CHANGED
@@ -9,7 +9,6 @@ Author:
|
|
9 |
|
10 |
from lighteval.tasks.lighteval_task import LightevalTaskConfig
|
11 |
from lighteval.tasks.requests import Doc
|
12 |
-
from lighteval.tasks.tasks_prompt_formatting import LETTER_INDICES
|
13 |
|
14 |
|
15 |
## EVAL WITH NO SUBSET ##
|
@@ -17,7 +16,7 @@ from lighteval.tasks.tasks_prompt_formatting import LETTER_INDICES
|
|
17 |
# attached to it, and one evaluation possible.
|
18 |
task = LightevalTaskConfig(
|
19 |
name="myothertask",
|
20 |
-
prompt_function="prompt_fn", # must be defined in the file or imported from
|
21 |
suite=["community"],
|
22 |
hf_repo="",
|
23 |
hf_subset="default",
|
@@ -46,7 +45,7 @@ class CustomSubsetTask(LightevalTaskConfig):
|
|
46 |
super().__init__(
|
47 |
name=name,
|
48 |
hf_subset=hf_subset,
|
49 |
-
prompt_function="prompt_fn", # must be defined in
|
50 |
hf_repo="",
|
51 |
metric=[""],
|
52 |
hf_avail_splits=[],
|
@@ -71,7 +70,7 @@ def prompt_fn(line, task_name: str = None):
|
|
71 |
return Doc(
|
72 |
task_name=task_name,
|
73 |
query="",
|
74 |
-
choices=
|
75 |
gold_index=0,
|
76 |
instruction="",
|
77 |
)
|
|
|
9 |
|
10 |
from lighteval.tasks.lighteval_task import LightevalTaskConfig
|
11 |
from lighteval.tasks.requests import Doc
|
|
|
12 |
|
13 |
|
14 |
## EVAL WITH NO SUBSET ##
|
|
|
16 |
# attached to it, and one evaluation possible.
|
17 |
task = LightevalTaskConfig(
|
18 |
name="myothertask",
|
19 |
+
prompt_function="prompt_fn", # must be defined in the file or imported from lighteval.tasks.default_prompts
|
20 |
suite=["community"],
|
21 |
hf_repo="",
|
22 |
hf_subset="default",
|
|
|
45 |
super().__init__(
|
46 |
name=name,
|
47 |
hf_subset=hf_subset,
|
48 |
+
prompt_function="prompt_fn", # must be defined in this file or imported from lighteval.tasks.default_prompts
|
49 |
hf_repo="",
|
50 |
metric=[""],
|
51 |
hf_avail_splits=[],
|
|
|
70 |
return Doc(
|
71 |
task_name=task_name,
|
72 |
query="",
|
73 |
+
choices=[],
|
74 |
gold_index=0,
|
75 |
instruction="",
|
76 |
)
|