__init__.py 870 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
8
9
10
11
12
13
14
15
16
17
18
19
20
21
TASK_REGISTRY = {
    "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,
    "boolq": superglue.BoolQ,
    "commitmentbank": superglue.CommitmentBank,
    "copa": superglue.Copa,
    "wic": superglue.WordsInContext,
    "wsc": superglue.WinogradSchemaChallenge,
Leo Gao's avatar
Leo Gao committed
22
23
    "arc_easy": arc.ARCEasy,
    "arc_challenge": arc.ARCChallenge,
Leo Gao's avatar
Leo Gao committed
24
    "race": race.RACE,
Leo Gao's avatar
Leo Gao committed
25
    "webqs": webqs.WebQs,
Jason Phang's avatar
Jason Phang committed
26
}
Jason Phang's avatar
gpt3  
Jason Phang committed
27
28


Jason Phang's avatar
Jason Phang committed
29
ALL_TASKS = sorted(list(TASK_REGISTRY))
Jason Phang's avatar
Jason Phang committed
30
31


Jason Phang's avatar
cleanup  
Jason Phang committed
32
def get_task(task_name):
Jason Phang's avatar
Jason Phang committed
33
    return TASK_REGISTRY[task_name]
Jason Phang's avatar
cleanup  
Jason Phang committed
34
35
36
37
38
39
40


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