other improvements :)
Browse files- app.py +8 -0
- summary_page.py +32 -6
app.py
CHANGED
|
@@ -569,6 +569,7 @@ with gr.Blocks(title="Model Test Results Dashboard", css=load_css(), js=js_func)
|
|
| 569 |
nvidia_plot,
|
| 570 |
gr.update(visible=False), # time_series_detail_view
|
| 571 |
False, # in_model_view_state
|
|
|
|
| 572 |
)
|
| 573 |
else:
|
| 574 |
fig = create_summary_page(Ci_results.df, Ci_results.available_models)
|
|
@@ -585,6 +586,7 @@ with gr.Blocks(title="Model Test Results Dashboard", css=load_css(), js=js_func)
|
|
| 585 |
gr.update(visible=False), # time_series_nvidia_tests
|
| 586 |
gr.update(visible=False), # time_series_detail_view
|
| 587 |
False, # in_model_view_state
|
|
|
|
| 588 |
)
|
| 589 |
|
| 590 |
summary_button.click(
|
|
@@ -603,6 +605,7 @@ with gr.Blocks(title="Model Test Results Dashboard", css=load_css(), js=js_func)
|
|
| 603 |
time_series_nvidia_tests,
|
| 604 |
time_series_detail_view,
|
| 605 |
in_model_view_state,
|
|
|
|
| 606 |
],
|
| 607 |
)
|
| 608 |
|
|
@@ -695,6 +698,7 @@ with gr.Blocks(title="Model Test Results Dashboard", css=load_css(), js=js_func)
|
|
| 695 |
return (
|
| 696 |
gr.update(visible=False), # current_view
|
| 697 |
gr.update(visible=True), # historical_view
|
|
|
|
| 698 |
gr.update(visible=False), # summary_display
|
| 699 |
gr.update(visible=False), # detail_view
|
| 700 |
gr.update(visible=False), # time_series_failure_rates
|
|
@@ -713,6 +717,7 @@ with gr.Blocks(title="Model Test Results Dashboard", css=load_css(), js=js_func)
|
|
| 713 |
return (
|
| 714 |
gr.update(visible=False), # current_view
|
| 715 |
gr.update(visible=True), # historical_view
|
|
|
|
| 716 |
gr.update(visible=False), # summary_display
|
| 717 |
gr.update(visible=False), # detail_view
|
| 718 |
fr_plot, # time_series_failure_rates (value + keep visibility)
|
|
@@ -733,6 +738,7 @@ with gr.Blocks(title="Model Test Results Dashboard", css=load_css(), js=js_func)
|
|
| 733 |
return (
|
| 734 |
gr.update(visible=True), # current_view
|
| 735 |
gr.update(visible=False), # historical_view
|
|
|
|
| 736 |
gr.update(visible=False), # summary_display
|
| 737 |
gr.update(visible=True), # detail_view
|
| 738 |
gr.update(visible=False), # time_series_failure_rates
|
|
@@ -751,6 +757,7 @@ with gr.Blocks(title="Model Test Results Dashboard", css=load_css(), js=js_func)
|
|
| 751 |
return (
|
| 752 |
gr.update(visible=True), # current_view
|
| 753 |
gr.update(visible=False), # historical_view
|
|
|
|
| 754 |
gr.update(value=fig, visible=True), # summary_display
|
| 755 |
gr.update(visible=False), # detail_view
|
| 756 |
gr.update(visible=False), # time_series_failure_rates
|
|
@@ -771,6 +778,7 @@ with gr.Blocks(title="Model Test Results Dashboard", css=load_css(), js=js_func)
|
|
| 771 |
outputs=[
|
| 772 |
current_view,
|
| 773 |
historical_view,
|
|
|
|
| 774 |
summary_display,
|
| 775 |
detail_view,
|
| 776 |
time_series_failure_rates,
|
|
|
|
| 569 |
nvidia_plot,
|
| 570 |
gr.update(visible=False), # time_series_detail_view
|
| 571 |
False, # in_model_view_state
|
| 572 |
+
"", # selected_model_state (clear it)
|
| 573 |
)
|
| 574 |
else:
|
| 575 |
fig = create_summary_page(Ci_results.df, Ci_results.available_models)
|
|
|
|
| 586 |
gr.update(visible=False), # time_series_nvidia_tests
|
| 587 |
gr.update(visible=False), # time_series_detail_view
|
| 588 |
False, # in_model_view_state
|
| 589 |
+
"", # selected_model_state (clear it)
|
| 590 |
)
|
| 591 |
|
| 592 |
summary_button.click(
|
|
|
|
| 605 |
time_series_nvidia_tests,
|
| 606 |
time_series_detail_view,
|
| 607 |
in_model_view_state,
|
| 608 |
+
selected_model_state,
|
| 609 |
],
|
| 610 |
)
|
| 611 |
|
|
|
|
| 698 |
return (
|
| 699 |
gr.update(visible=False), # current_view
|
| 700 |
gr.update(visible=True), # historical_view
|
| 701 |
+
gr.update(visible=False), # summary_view
|
| 702 |
gr.update(visible=False), # summary_display
|
| 703 |
gr.update(visible=False), # detail_view
|
| 704 |
gr.update(visible=False), # time_series_failure_rates
|
|
|
|
| 717 |
return (
|
| 718 |
gr.update(visible=False), # current_view
|
| 719 |
gr.update(visible=True), # historical_view
|
| 720 |
+
gr.update(visible=False), # summary_view
|
| 721 |
gr.update(visible=False), # summary_display
|
| 722 |
gr.update(visible=False), # detail_view
|
| 723 |
fr_plot, # time_series_failure_rates (value + keep visibility)
|
|
|
|
| 738 |
return (
|
| 739 |
gr.update(visible=True), # current_view
|
| 740 |
gr.update(visible=False), # historical_view
|
| 741 |
+
gr.update(visible=False), # summary_view
|
| 742 |
gr.update(visible=False), # summary_display
|
| 743 |
gr.update(visible=True), # detail_view
|
| 744 |
gr.update(visible=False), # time_series_failure_rates
|
|
|
|
| 757 |
return (
|
| 758 |
gr.update(visible=True), # current_view
|
| 759 |
gr.update(visible=False), # historical_view
|
| 760 |
+
gr.update(visible=True), # summary_view
|
| 761 |
gr.update(value=fig, visible=True), # summary_display
|
| 762 |
gr.update(visible=False), # detail_view
|
| 763 |
gr.update(visible=False), # time_series_failure_rates
|
|
|
|
| 778 |
outputs=[
|
| 779 |
current_view,
|
| 780 |
historical_view,
|
| 781 |
+
summary_view,
|
| 782 |
summary_display,
|
| 783 |
detail_view,
|
| 784 |
time_series_failure_rates,
|
summary_page.py
CHANGED
|
@@ -212,6 +212,10 @@ def create_summary_page(df: pd.DataFrame, available_models: list[str]) -> plt.Fi
|
|
| 212 |
|
| 213 |
visible_model_count = 0
|
| 214 |
max_y = 0
|
|
|
|
|
|
|
|
|
|
|
|
|
| 215 |
|
| 216 |
for i, model_name in enumerate(available_models):
|
| 217 |
if model_name not in df.index:
|
|
@@ -221,6 +225,15 @@ def create_summary_page(df: pd.DataFrame, available_models: list[str]) -> plt.Fi
|
|
| 221 |
|
| 222 |
# Extract and process model data
|
| 223 |
amd_stats, nvidia_stats = extract_model_data(row)[:2]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 224 |
|
| 225 |
# Calculate position in 4-column grid
|
| 226 |
col = visible_model_count % COLUMNS
|
|
@@ -262,12 +275,25 @@ def create_summary_page(df: pd.DataFrame, available_models: list[str]) -> plt.Fi
|
|
| 262 |
legend_y = max_y + 1
|
| 263 |
legend_spacing = 10
|
| 264 |
legend_font_size = 15
|
| 265 |
-
|
| 266 |
-
# Add
|
| 267 |
-
#
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 271 |
|
| 272 |
# Legend entries
|
| 273 |
legend_items = [
|
|
|
|
| 212 |
|
| 213 |
visible_model_count = 0
|
| 214 |
max_y = 0
|
| 215 |
+
|
| 216 |
+
# Initialize counters for total tests
|
| 217 |
+
amd_totals = {'passed': 0, 'failed': 0, 'skipped': 0}
|
| 218 |
+
nvidia_totals = {'passed': 0, 'failed': 0, 'skipped': 0}
|
| 219 |
|
| 220 |
for i, model_name in enumerate(available_models):
|
| 221 |
if model_name not in df.index:
|
|
|
|
| 225 |
|
| 226 |
# Extract and process model data
|
| 227 |
amd_stats, nvidia_stats = extract_model_data(row)[:2]
|
| 228 |
+
|
| 229 |
+
# Accumulate totals
|
| 230 |
+
amd_totals['passed'] += amd_stats['passed']
|
| 231 |
+
amd_totals['failed'] += amd_stats['failed'] + amd_stats['error']
|
| 232 |
+
amd_totals['skipped'] += amd_stats['skipped']
|
| 233 |
+
|
| 234 |
+
nvidia_totals['passed'] += nvidia_stats['passed']
|
| 235 |
+
nvidia_totals['failed'] += nvidia_stats['failed'] + nvidia_stats['error']
|
| 236 |
+
nvidia_totals['skipped'] += nvidia_stats['skipped']
|
| 237 |
|
| 238 |
# Calculate position in 4-column grid
|
| 239 |
col = visible_model_count % COLUMNS
|
|
|
|
| 275 |
legend_y = max_y + 1
|
| 276 |
legend_spacing = 10
|
| 277 |
legend_font_size = 15
|
| 278 |
+
|
| 279 |
+
# Add AMD and NVIDIA test totals in the bottom left
|
| 280 |
+
# Calculate line spacing to align middle with legend
|
| 281 |
+
line_height = 0.4 # Height between lines
|
| 282 |
+
|
| 283 |
+
# Position the two lines so their middle aligns with legend_y
|
| 284 |
+
amd_y = legend_y - line_height / 2
|
| 285 |
+
nvidia_y = legend_y + line_height / 2
|
| 286 |
+
|
| 287 |
+
amd_totals_text = f"AMD Tests - Passed: {amd_totals['passed']}, Failed: {amd_totals['failed']}, Skipped: {amd_totals['skipped']}"
|
| 288 |
+
nvidia_totals_text = f"NVIDIA Tests - Passed: {nvidia_totals['passed']}, Failed: {nvidia_totals['failed']}, Skipped: {nvidia_totals['skipped']}"
|
| 289 |
+
|
| 290 |
+
ax.text(0, amd_y, amd_totals_text,
|
| 291 |
+
ha='left', va='bottom', color='#CCCCCC',
|
| 292 |
+
fontsize=14, fontfamily='monospace')
|
| 293 |
+
|
| 294 |
+
ax.text(0, nvidia_y, nvidia_totals_text,
|
| 295 |
+
ha='left', va='bottom', color='#CCCCCC',
|
| 296 |
+
fontsize=14, fontfamily='monospace')
|
| 297 |
|
| 298 |
# Legend entries
|
| 299 |
legend_items = [
|