__init__.py 1.16 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
Charles Foster's avatar
Charles Foster committed
7
from . import openbookqa
Charles Foster's avatar
Charles Foster committed
8
from . import squad
Jason Phang's avatar
gpt3  
Jason Phang committed
9

Jason Phang's avatar
Jason Phang committed
10
TASK_REGISTRY = {
Jason Phang's avatar
multirc  
Jason Phang committed
11
    # GLUE
Jason Phang's avatar
Jason Phang committed
12
13
14
15
16
17
18
19
20
    "cola": glue.CoLA,
    "mnli": glue.MNLI,
    "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
21
    # SuperGLUE
Jason Phang's avatar
Jason Phang committed
22
23
24
    "boolq": superglue.BoolQ,
    "commitmentbank": superglue.CommitmentBank,
    "copa": superglue.Copa,
Jason Phang's avatar
multirc  
Jason Phang committed
25
    "multirc": superglue.MultiRC,
Jason Phang's avatar
Jason Phang committed
26
27
    "wic": superglue.WordsInContext,
    "wsc": superglue.WinogradSchemaChallenge,
Jason Phang's avatar
multirc  
Jason Phang committed
28
    # Order by benchmark/genre?
Leo Gao's avatar
Leo Gao committed
29
30
    "arc_easy": arc.ARCEasy,
    "arc_challenge": arc.ARCChallenge,
Charles Foster's avatar
Charles Foster committed
31
    "openbookqa": openbookqa.OpenBookQA,
Charles Foster's avatar
Charles Foster committed
32
    "squad": squad.SQuAD,
Leo Gao's avatar
Leo Gao committed
33
    "race": race.RACE,
Leo Gao's avatar
Leo Gao committed
34
    "webqs": webqs.WebQs,
Leo Gao's avatar
Leo Gao committed
35
36
37
    "anli_r1": anli.ANLIRound1,
    "anli_r2": anli.ANLIRound2,
    "anli_r3": anli.ANLIRound3,
Jason Phang's avatar
Jason Phang committed
38
}
Jason Phang's avatar
gpt3  
Jason Phang committed
39
40


Jason Phang's avatar
Jason Phang committed
41
ALL_TASKS = sorted(list(TASK_REGISTRY))
Jason Phang's avatar
Jason Phang committed
42
43


Jason Phang's avatar
cleanup  
Jason Phang committed
44
def get_task(task_name):
Jason Phang's avatar
Jason Phang committed
45
    return TASK_REGISTRY[task_name]
Jason Phang's avatar
cleanup  
Jason Phang committed
46
47
48
49
50
51
52


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