"vscode:/vscode.git/clone" did not exist on "40a2205bc50ff0fd8af0158234d103d786bf3471"
make_table.py 530 Bytes
Newer Older
Leo Gao's avatar
Leo Gao committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from lm_eval import tasks
from pytablewriter import MarkdownTableWriter

writer = MarkdownTableWriter()
writer.headers = ["Task Name", "Train", "Val", "Test", "Metrics"]

values = []

def chk(tf):
    if tf:
        return '✓'
    else:
        return ' '

for tname, Task in tasks.TASK_REGISTRY.items():
    task = Task()

    values.append([tname,chk(task.has_training_docs()),chk(task.has_validation_docs()),chk(task.has_test_docs()),', '.join(task.aggregation().keys())])

writer.value_matrix = values

print(writer.dumps())