"lm_eval/models/openai.py" did not exist on "4923a7ce7ccd5af07ced8fbe07a650b066dcf3ec"
__init__.py 2.85 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
Leo Gao's avatar
Leo Gao committed
16
from . import lambada
Jon Tow's avatar
Jon Tow committed
17
from . import race 
Leo Gao's avatar
Leo Gao committed
18
from . import piqa
19
from . import triviaqa
jeffhsu3's avatar
jeffhsu3 committed
20
from . import pubmedqa
21
from . import sciq
22
from . import webqs
23
from . import qa4mre
24
25
from . import headqa
from . import mathqa
Jason Phang's avatar
gpt3  
Jason Phang committed
26

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

Leo Gao's avatar
Leo Gao committed
50
    "lambada": lambada.LAMBADA,
Leo Gao's avatar
Leo Gao committed
51
    "piqa": piqa.PiQA,
Leo Gao's avatar
Leo Gao committed
52

53
    # Science related
jeffhsu3's avatar
jeffhsu3 committed
54
    "pubmedqa" : pubmedqa.Pubmed_QA,
55
    "sciq" : sciq.SciQ,
56
57
58
59
    #"qa4mre" : qa4mre.QA4MRE,
    "qa4mre_2011" : qa4mre.QA4MRE_2011,
    "qa4mre_2012" : qa4mre.QA4MRE_2012,
    "qa4mre_2013" : qa4mre.QA4MRE_2013,
jeffhsu3's avatar
jeffhsu3 committed
60

Leo Gao's avatar
Leo Gao committed
61
    #"triviaqa": triviaqa.TriviaQA,
Jonathan Tow's avatar
Jonathan Tow committed
62
63
    "arc_easy": arc.ARCEasy,
    "arc_challenge": arc.ARCChallenge,
64
    # "quac": quac.QuAC, # not implemented yet
65
    "hellaswag": hellaswag.HellaSwag, # not implemented yet
Jon Tow's avatar
Jon Tow committed
66
    "openbookqa": openbookqa.OpenBookQA,
67
68
    # "sat": sat.SATAnalogies, # not implemented yet
    # "squad": squad.SQuAD, # not implemented yet
Jon Tow's avatar
Jon Tow committed
69
    "race": race.RACE,
70
    # "naturalqs": naturalqs.NaturalQs, # not implemented yet
71
72
    "headqa": headqa.HeadQA,
    "mathqa": mathqa.MathQA,
73
    "webqs": webqs.WebQs,
74
    "wsc273": wsc273.WinogradSchemaChallenge273,
75
    "winogrande": winogrande.Winogrande,
Jonathan Tow's avatar
Jonathan Tow committed
76
77
78
    "anli_r1": anli.ANLIRound1,
    "anli_r2": anli.ANLIRound2,
    "anli_r3": anli.ANLIRound3,
79
80
81
82
83
84
85
86
87
88
89
90
    # 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
91
}
Jason Phang's avatar
gpt3  
Jason Phang committed
92
93


Jason Phang's avatar
Jason Phang committed
94
ALL_TASKS = sorted(list(TASK_REGISTRY))
Jason Phang's avatar
Jason Phang committed
95
96


Jason Phang's avatar
cleanup  
Jason Phang committed
97
def get_task(task_name):
Jason Phang's avatar
Jason Phang committed
98
    return TASK_REGISTRY[task_name]
Jason Phang's avatar
cleanup  
Jason Phang committed
99
100
101
102
103
104
105


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