This repository was archived by the owner on Jul 27, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdiagnostics_app.py
More file actions
82 lines (70 loc) · 1.95 KB
/
Copy pathdiagnostics_app.py
File metadata and controls
82 lines (70 loc) · 1.95 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import gradio as gr
from utils.runtime_diagnostics import (
active_processes_text,
bootstrap_dataframe,
diagnostics_report_text,
gpu_status_text,
recent_jobs_dataframe,
system_runtime_text,
worker_status_text,
)
with gr.Blocks(title="Moses Diagnostics") as app:
gr.Markdown("# Moses Runtime Diagnostics")
gr.Markdown("Live operational diagnostics for the Moses processing platform.")
refresh_button = gr.Button("Refresh Diagnostics")
with gr.Tab("Bootstrap"):
bootstrap_table = gr.Dataframe(
label="Startup Validation",
interactive=False
)
with gr.Tab("Runtime"):
runtime_text = gr.Textbox(
label="System Runtime",
lines=12
)
with gr.Tab("GPU Scheduler"):
gpu_text = gr.Textbox(
label="GPU Scheduler Status",
lines=14
)
with gr.Tab("Worker Pools"):
worker_text = gr.Textbox(
label="Worker Pool Status",
lines=12
)
with gr.Tab("Active Processes"):
process_text = gr.Textbox(
label="Active Process Registry",
lines=12
)
with gr.Tab("Recent Jobs"):
jobs_table = gr.Dataframe(
label="Recent Jobs",
interactive=False
)
with gr.Tab("Combined Report"):
report_text = gr.Textbox(
label="Diagnostics Report",
lines=30
)
refresh_button.click(
fn=lambda: (
bootstrap_dataframe(),
system_runtime_text(),
gpu_status_text(),
worker_status_text(),
active_processes_text(),
recent_jobs_dataframe(),
diagnostics_report_text(),
),
outputs=[
bootstrap_table,
runtime_text,
gpu_text,
worker_text,
process_text,
jobs_table,
report_text,
]
)
app.launch()