__init__.py 2.13 KB
Newer Older
Jason Phang's avatar
Jason Phang committed
1
2
from . import superglue
from . import glue
Leo Gao's avatar
Leo Gao committed
3
from . import arc
Leo Gao's avatar
Leo Gao committed
4
from . import race
Leo Gao's avatar
Leo Gao committed
5
from . import webqs
Leo Gao's avatar
Leo Gao committed
6
from . import anli
7
from . import wsc273
Charles Foster's avatar
Charles Foster committed
8
from . import winogrande
Charles Foster's avatar
Charles Foster committed
9
from . import quac
Charles Foster's avatar
Charles Foster committed
10
from . import hellaswag
Charles Foster's avatar
Charles Foster committed
11
from . import openbookqa
Charles Foster's avatar
Charles Foster committed
12
from . import squad
13
from . import naturalqs
14
from . import sat
15
from . import arithmetic
Jason Phang's avatar
gpt3  
Jason Phang committed
16

Jason Phang's avatar
Jason Phang committed
17
TASK_REGISTRY = {
Jason Phang's avatar
multirc  
Jason Phang committed
18
    # GLUE
Jason Phang's avatar
Jason Phang committed
19
20
    "cola": glue.CoLA,
    "mnli": glue.MNLI,
Jason Phang's avatar
Jason Phang committed
21
    "mnli_mismatched": glue.MNLIMismatched,
Jason Phang's avatar
Jason Phang committed
22
23
24
25
26
27
28
    "mrpc": glue.MRPC,
    "rte": glue.RTE,
    "qnli": glue.QNLI,
    "qqp": glue.QQP,
    "stsb": glue.STSB,
    "sst": glue.SST,
    "wnli": glue.WNLI,
Jason Phang's avatar
multirc  
Jason Phang committed
29
    # SuperGLUE
Jason Phang's avatar
Jason Phang committed
30
    "boolq": superglue.BoolQ,
thefazzer's avatar
thefazzer committed
31
    "cb": superglue.CommitmentBank,
Jason Phang's avatar
Jason Phang committed
32
    "copa": superglue.Copa,
Jason Phang's avatar
multirc  
Jason Phang committed
33
    "multirc": superglue.MultiRC,
Jason Phang's avatar
Jason Phang committed
34
    "record": superglue.ReCoRD,
Jason Phang's avatar
Jason Phang committed
35
    "wic": superglue.WordsInContext,
36
    "wsc": superglue.SGWinogradSchemaChallenge,
Jason Phang's avatar
multirc  
Jason Phang committed
37
    # Order by benchmark/genre?
Leo Gao's avatar
Leo Gao committed
38
39
    "arc_easy": arc.ARCEasy,
    "arc_challenge": arc.ARCChallenge,
Charles Foster's avatar
Charles Foster committed
40
    "quac": quac.QuAC,
Charles Foster's avatar
Charles Foster committed
41
    "hellaswag": hellaswag.HellaSwag,
Charles Foster's avatar
Charles Foster committed
42
    "openbookqa": openbookqa.OpenBookQA,
43
    "sat": sat.SATAnalogies,
Charles Foster's avatar
Charles Foster committed
44
    "squad": squad.SQuAD,
Leo Gao's avatar
Leo Gao committed
45
    "race": race.RACE,
46
    "naturalqs": naturalqs.NaturalQs,
Leo Gao's avatar
Leo Gao committed
47
    "webqs": webqs.WebQs,
48
    "wsc273": wsc273.WinogradSchemaChallenge273,
Charles Foster's avatar
Charles Foster committed
49
    "winogrande": winogrande.Winogrande,
Leo Gao's avatar
Leo Gao committed
50
51
52
    "anli_r1": anli.ANLIRound1,
    "anli_r2": anli.ANLIRound2,
    "anli_r3": anli.ANLIRound3,
53
54
55
56
57
58
59
60
61
62
63
64
    # arithmetic
    "arithmetic_2da": arithmetic.Arithmetic2DPlus,
    "arithmetic_2ds": arithmetic.Arithmetic2DMinus,
    "arithmetic_3da": arithmetic.Arithmetic3DPlus,
    "arithmetic_3ds": arithmetic.Arithmetic3DMinus,
    "arithmetic_4da": arithmetic.Arithmetic4DPlus,
    "arithmetic_4ds": arithmetic.Arithmetic4DMinus,
    "arithmetic_5da": arithmetic.Arithmetic5DPlus,
    "arithmetic_5ds": arithmetic.Arithmetic5DMinus,
    "arithmetic_2dm": arithmetic.Arithmetic2DMultiplication,
    "arithmetic_1dc": arithmetic.Arithmetic1DComposite,

Jason Phang's avatar
Jason Phang committed
65
}
Jason Phang's avatar
gpt3  
Jason Phang committed
66
67


Jason Phang's avatar
Jason Phang committed
68
ALL_TASKS = sorted(list(TASK_REGISTRY))
Jason Phang's avatar
Jason Phang committed
69
70


Jason Phang's avatar
cleanup  
Jason Phang committed
71
def get_task(task_name):
Jason Phang's avatar
Jason Phang committed
72
    return TASK_REGISTRY[task_name]
Jason Phang's avatar
cleanup  
Jason Phang committed
73
74
75
76
77
78
79


def get_task_dict(task_name_list):
    return {
        task_name: get_task(task_name)()
        for task_name in task_name_list
    }