-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcli.py
49 lines (40 loc) · 1.01 KB
/
cli.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from cProfile import run
from typing import List
import click
import run_exp
from itabqa import objs, qa
@click.group()
def cli():
pass
@click.command()
@click.option("--split", default="val")
@click.option("--head", default=0)
@click.option("--from_ground_truth", default=False)
@click.option("--qa_models", default=qa.QA_MODEL.OMNITAB_FT_RAW_1)
@click.option("--device_id", default=0)
@click.option("--ago_headers", default=False)
@click.option("--ago_html", default=False)
@click.option("--setting", default="temp")
def run_qa(
split: objs.DataSplit,
head: int = 0,
from_ground_truth: bool = True,
qa_models: List[qa.QA_MODEL] = None,
device_id: int = 0,
ago_headers: bool = False,
ago_html: bool = True,
setting: str = "temp",
):
return run_exp.run_eval_split(
split,
head,
from_ground_truth,
qa_models,
device_id,
ago_headers,
ago_html,
setting,
)
cli.add_command(run_qa)
if __name__ == "__main__":
cli()