Spaces:
Running
Running
clean bbh
Browse files
tasks.py
CHANGED
|
@@ -781,42 +781,29 @@ class BBH:
|
|
| 781 |
def suite(
|
| 782 |
cls,
|
| 783 |
):
|
| 784 |
-
|
| 785 |
-
|
| 786 |
-
|
| 787 |
-
|
| 788 |
-
|
| 789 |
-
|
| 790 |
-
|
| 791 |
-
|
| 792 |
-
|
| 793 |
-
|
| 794 |
-
)
|
| 795 |
-
suite = defaultdict(list)
|
| 796 |
-
categories = list(finer_categories.keys())
|
| 797 |
-
for cate in categories:
|
| 798 |
-
if cate in cls.bbh_multiple_choice_sets:
|
| 799 |
-
suite[cate].append(
|
| 800 |
-
Task(
|
| 801 |
-
("lukaemon/bbh", cate),
|
| 802 |
-
metric_name=("sustech/tlem", "bbh_mcq"),
|
| 803 |
-
input_column=cls.input_column,
|
| 804 |
-
label_column=cls.label_column,
|
| 805 |
-
prompt=partial(cls.prompt_bbh, category=cate),
|
| 806 |
-
few_shot=0,
|
| 807 |
-
)
|
| 808 |
)
|
| 809 |
-
|
| 810 |
-
|
| 811 |
-
|
| 812 |
-
|
| 813 |
-
|
| 814 |
-
|
| 815 |
-
|
| 816 |
-
|
| 817 |
-
|
| 818 |
-
|
| 819 |
)
|
|
|
|
| 820 |
|
| 821 |
return suite
|
| 822 |
|
|
|
|
| 781 |
def suite(
|
| 782 |
cls,
|
| 783 |
):
|
| 784 |
+
suite = []
|
| 785 |
+
for cate in cls.bbh_multiple_choice_sets:
|
| 786 |
+
suite.append(
|
| 787 |
+
Task(
|
| 788 |
+
("lukaemon/bbh", cate),
|
| 789 |
+
metric_name=("sustech/tlem", "bbh_mcq"),
|
| 790 |
+
input_column=cls.input_column,
|
| 791 |
+
label_column=cls.label_column,
|
| 792 |
+
prompt=partial(cls.prompt_bbh, category=cate),
|
| 793 |
+
few_shot=0,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 794 |
)
|
| 795 |
+
)
|
| 796 |
+
for cate in cls.bbh_free_form_sets:
|
| 797 |
+
suite.append(
|
| 798 |
+
Task(
|
| 799 |
+
("lukaemon/bbh", cate),
|
| 800 |
+
metric_name=("sustech/tlem", "bbh_freefrom"),
|
| 801 |
+
input_column=cls.input_column,
|
| 802 |
+
label_column=cls.label_column,
|
| 803 |
+
prompt=partial(cls.prompt_bbh, category=cate),
|
| 804 |
+
few_shot=0,
|
| 805 |
)
|
| 806 |
+
)
|
| 807 |
|
| 808 |
return suite
|
| 809 |
|