-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_gui.py
More file actions
executable file
·47 lines (41 loc) · 1.51 KB
/
run_gui.py
File metadata and controls
executable file
·47 lines (41 loc) · 1.51 KB
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
#!/usr/bin/env python3
import os
os.environ['distqat_skip_model_load'] = '1'
from src.distqat.gui.layout import init_ui
from src.distqat.gui.icons import ICON_SVG
from src.distqat.gui.colors import PRIMARY_COLOR, SECONDARY_COLOR, BACKGROUND_COLOR, POSITIVE_COLOR, NEGATIVE_COLOR, INFO_COLOR, DARK_COLOR, DARK_PAGE_COLOR, ACCENT_COLOR, WARNING_COLOR
from nicegui import ui
import argparse
from run_script_utils import is_wandb_logged_in
def main():
parser = argparse.ArgumentParser()
parser.add_argument("--port", type=int, default=8080)
parser.add_argument("--host", type=str, default="0.0.0.0")
parser.add_argument("--no-wandb", action="store_true")
args = parser.parse_args()
if not args.no_wandb and not is_wandb_logged_in():
raise RuntimeError("Wandb is not logged in, please login to wandb using the wandb login command or set the wandb_project to None through the config file or command line argument")
ui.colors(
primary=PRIMARY_COLOR,
secondary=SECONDARY_COLOR,
accent=ACCENT_COLOR,
dark=DARK_COLOR,
dark_page=DARK_PAGE_COLOR,
positive=POSITIVE_COLOR,
negative=NEGATIVE_COLOR,
info=INFO_COLOR,
warning=WARNING_COLOR,
custom_colors={
'background': BACKGROUND_COLOR
}
)
init_ui(args.no_wandb)
ui.run(
title="DistQAT Dashboard",
port=args.port,
host=args.host,
favicon=ICON_SVG,
dark=True
)
if __name__ in {"__main__", "__mp_main__"}:
main()