__init__.py 963 Bytes
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
Jason Phang's avatar
gpt3  
Jason Phang committed
6

Jason Phang's avatar
Jason Phang committed
7
TASK_REGISTRY = {
Jason Phang's avatar
multirc  
Jason Phang committed
8
    # GLUE
Jason Phang's avatar
Jason Phang committed
9
10
11
12
13
14
15
16
17
    "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
18
    # SuperGLUE
Jason Phang's avatar
Jason Phang committed
19
20
21
    "boolq": superglue.BoolQ,
    "commitmentbank": superglue.CommitmentBank,
    "copa": superglue.Copa,
Jason Phang's avatar
multirc  
Jason Phang committed
22
    "multirc": superglue.MultiRC,
Jason Phang's avatar
Jason Phang committed
23
24
    "wic": superglue.WordsInContext,
    "wsc": superglue.WinogradSchemaChallenge,
Jason Phang's avatar
multirc  
Jason Phang committed
25
    # Order by benchmark/genre?
Leo Gao's avatar
Leo Gao committed
26
27
    "arc_easy": arc.ARCEasy,
    "arc_challenge": arc.ARCChallenge,
Leo Gao's avatar
Leo Gao committed
28
    "race": race.RACE,
Leo Gao's avatar
Leo Gao committed
29
    "webqs": webqs.WebQs,
Jason Phang's avatar
Jason Phang committed
30
}
Jason Phang's avatar
gpt3  
Jason Phang committed
31
32


Jason Phang's avatar
Jason Phang committed
33
ALL_TASKS = sorted(list(TASK_REGISTRY))
Jason Phang's avatar
Jason Phang committed
34
35


Jason Phang's avatar
cleanup  
Jason Phang committed
36
def get_task(task_name):
Jason Phang's avatar
Jason Phang committed
37
    return TASK_REGISTRY[task_name]
Jason Phang's avatar
cleanup  
Jason Phang committed
38
39
40
41
42
43
44


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