"template/llama2-chat.json" did not exist on "b0135f4b9b176eab9155b660d04c9ca2a1ec2341"
__init__.py 2.57 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
thefazzer's avatar
thefazzer committed
4
from . import coqa
Leo Gao's avatar
Leo Gao committed
5
from . import race
Leo Gao's avatar
Leo Gao committed
6
from . import webqs
Leo Gao's avatar
Leo Gao committed
7
from . import anli
8
from . import wsc273
Charles Foster's avatar
Charles Foster committed
9
from . import winogrande
Charles Foster's avatar
Charles Foster committed
10
from . import quac
Charles Foster's avatar
Charles Foster committed
11
from . import hellaswag
Charles Foster's avatar
Charles Foster committed
12
from . import openbookqa
Charles Foster's avatar
Charles Foster committed
13
from . import squad
14
from . import naturalqs
15
from . import sat
16
from . import arithmetic
Leo Gao's avatar
Leo Gao committed
17
from . import lambada
Jon Tow's avatar
Jon Tow committed
18
from . import race 
Leo Gao's avatar
Leo Gao committed
19
from . import piqa
20
from . import triviaqa
21
from . import webqs
Jason Phang's avatar
gpt3  
Jason Phang committed
22
23


Jason Phang's avatar
Jason Phang committed
24
TASK_REGISTRY = {
Jason Phang's avatar
multirc  
Jason Phang committed
25
    # GLUE
Jason Phang's avatar
Jason Phang committed
26
27
    "cola": glue.CoLA,
    "mnli": glue.MNLI,
Jason Phang's avatar
Jason Phang committed
28
    "mnli_mismatched": glue.MNLIMismatched,
Jason Phang's avatar
Jason Phang committed
29
30
31
32
    "mrpc": glue.MRPC,
    "rte": glue.RTE,
    "qnli": glue.QNLI,
    "qqp": glue.QQP,
33
    #"stsb": glue.STSB, # not implemented yet
Jason Phang's avatar
Jason Phang committed
34
35
    "sst": glue.SST,
    "wnli": glue.WNLI,
Jason Phang's avatar
multirc  
Jason Phang committed
36
    # SuperGLUE
Jason Phang's avatar
Jason Phang committed
37
    "boolq": superglue.BoolQ,
thefazzer's avatar
thefazzer committed
38
    "cb": superglue.CommitmentBank,
Jason Phang's avatar
Jason Phang committed
39
    "copa": superglue.Copa,
Jason Phang's avatar
multirc  
Jason Phang committed
40
    "multirc": superglue.MultiRC,
Leo Gao's avatar
Leo Gao committed
41
    #"record": superglue.ReCoRD,
Jason Phang's avatar
Jason Phang committed
42
    "wic": superglue.WordsInContext,
Jason Phang's avatar
wsc  
Jason Phang committed
43
    "wsc": superglue.SGWinogradSchemaChallenge,
44
    
Jason Phang's avatar
multirc  
Jason Phang committed
45
    # Order by benchmark/genre?
thefazzer's avatar
thefazzer committed
46
    "coqa": coqa.CoQA,
Leo Gao's avatar
Leo Gao committed
47
    "lambada": lambada.LAMBADA,
Leo Gao's avatar
Leo Gao committed
48
    "piqa": piqa.PiQA,
Leo Gao's avatar
Leo Gao committed
49

Leo Gao's avatar
Leo Gao committed
50
    #"triviaqa": triviaqa.TriviaQA,
51
52
53
    # "arc_easy": arc.ARCEasy, # not implemented yet
    # "arc_challenge": arc.ARCChallenge, # not implemented yet
    # "quac": quac.QuAC, # not implemented yet
54
    "hellaswag": hellaswag.HellaSwag, # not implemented yet
55
56
57
    # "openbookqa": openbookqa.OpenBookQA, # not implemented yet
    # "sat": sat.SATAnalogies, # not implemented yet
    # "squad": squad.SQuAD, # not implemented yet
Jon Tow's avatar
Jon Tow committed
58
    "race": race.RACE,
59
    # "naturalqs": naturalqs.NaturalQs, # not implemented yet
60
    "webqs": webqs.WebQs,
61
    "wsc273": wsc273.WinogradSchemaChallenge273,
62
    "winogrande": winogrande.Winogrande,
Jonathan Tow's avatar
Jonathan Tow committed
63
64
65
    "anli_r1": anli.ANLIRound1,
    "anli_r2": anli.ANLIRound2,
    "anli_r3": anli.ANLIRound3,
66
67
68
69
70
71
72
73
74
75
76
77
    # 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
78
}
Jason Phang's avatar
gpt3  
Jason Phang committed
79
80


Jason Phang's avatar
Jason Phang committed
81
ALL_TASKS = sorted(list(TASK_REGISTRY))
Jason Phang's avatar
Jason Phang committed
82
83


Jason Phang's avatar
cleanup  
Jason Phang committed
84
def get_task(task_name):
Jason Phang's avatar
Jason Phang committed
85
    return TASK_REGISTRY[task_name]
Jason Phang's avatar
cleanup  
Jason Phang committed
86
87
88
89
90
91
92


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