ror HF Staff commited on
Commit
2c2d476
Β·
1 Parent(s): 4989641
Files changed (1) hide show
  1. app.py +32 -29
app.py CHANGED
@@ -107,7 +107,7 @@ def plot_model_stats(model_name: str) -> tuple[plt.Figure, str, str]:
107
  filtered_stats.values(),
108
  labels=[label.lower() for label in filtered_stats.keys()], # Lowercase for minimal look
109
  colors=chart_colors,
110
- autopct='%1.1f%%',
111
  startangle=90,
112
  explode=None, # No separation
113
  shadow=False,
@@ -138,16 +138,14 @@ def plot_model_stats(model_name: str) -> tuple[plt.Figure, str, str]:
138
  create_pie_chart(ax1, "amd", amd_filtered)
139
  create_pie_chart(ax2, "nvidia", nvidia_filtered)
140
 
141
- # Add subtle separation line between charts - longer to match layout
142
  line_x = 0.5
143
- fig.add_artist(plt.Line2D([line_x, line_x], [0.05, 0.9],
144
  color='#333333', linewidth=1, alpha=0.5,
145
  transform=fig.transFigure))
146
 
147
- # Add central shared title for model name and test count
148
- total_amd = sum(amd_stats.values())
149
- total_nvidia = sum(nvidia_stats.values())
150
- fig.suptitle(f'{model_name.lower()} β€’ amd: {total_amd} tests, nvidia: {total_nvidia} tests',
151
  fontsize=18, weight='normal', color='#CCCCCC',
152
  fontfamily='monospace', y=0.95)
153
 
@@ -159,8 +157,8 @@ def plot_model_stats(model_name: str) -> tuple[plt.Figure, str, str]:
159
  amd_failed = model_stats['amd']['failed']
160
  nvidia_failed = model_stats['nvidia']['failed']
161
 
162
- amd_failed_info = "\n".join(amd_failed) if amd_failed else "None"
163
- nvidia_failed_info = "\n".join(nvidia_failed) if nvidia_failed else "None"
164
 
165
  return fig, amd_failed_info, nvidia_failed_info
166
 
@@ -349,20 +347,27 @@ h1, h2, h3, p, .markdown {
349
  margin-left: 300px !important;
350
  }
351
 
352
- /* Failed tests display */
353
- .failed-tests {
354
- background-color: #1a1a1a !important;
355
- color: #CCCCCC !important;
356
  font-family: monospace !important;
357
- font-size: 12px !important;
358
- padding: 15px !important;
359
- margin-top: 20px !important;
360
- border-radius: 5px !important;
361
- border: 1px solid #333333 !important;
362
- max-height: 200px !important;
363
- overflow-y: auto !important;
364
- white-space: pre-line !important;
365
  }
 
 
 
 
 
 
 
 
 
 
366
  """
367
 
368
  # Create the Gradio interface with sidebar and dark theme
@@ -400,20 +405,18 @@ with gr.Blocks(title="Model Test Results Dashboard", css=dark_theme_css) as demo
400
  with gr.Row():
401
  with gr.Column(scale=1):
402
  amd_failed_tests_output = gr.Textbox(
403
- label="AMD Failed Tests",
404
- value="",
405
- lines=8,
406
- max_lines=8,
407
  interactive=False,
 
408
  elem_classes=["failed-tests"]
409
  )
410
  with gr.Column(scale=1):
411
  nvidia_failed_tests_output = gr.Textbox(
412
- label="NVIDIA Failed Tests",
413
- value="",
414
- lines=8,
415
- max_lines=8,
416
  interactive=False,
 
417
  elem_classes=["failed-tests"]
418
  )
419
 
 
107
  filtered_stats.values(),
108
  labels=[label.lower() for label in filtered_stats.keys()], # Lowercase for minimal look
109
  colors=chart_colors,
110
+ autopct=lambda pct: f'{int(pct/100*sum(filtered_stats.values()))}',
111
  startangle=90,
112
  explode=None, # No separation
113
  shadow=False,
 
138
  create_pie_chart(ax1, "amd", amd_filtered)
139
  create_pie_chart(ax2, "nvidia", nvidia_filtered)
140
 
141
+ # Add subtle separation line between charts - stops at device labels level
142
  line_x = 0.5
143
+ fig.add_artist(plt.Line2D([line_x, line_x], [0.0, 0.85],
144
  color='#333333', linewidth=1, alpha=0.5,
145
  transform=fig.transFigure))
146
 
147
+ # Add central shared title for model name
148
+ fig.suptitle(f'{model_name.lower()}',
 
 
149
  fontsize=18, weight='normal', color='#CCCCCC',
150
  fontfamily='monospace', y=0.95)
151
 
 
157
  amd_failed = model_stats['amd']['failed']
158
  nvidia_failed = model_stats['nvidia']['failed']
159
 
160
+ amd_failed_info = "Fails on AMD:\n────────────\n" + ("\n".join(amd_failed) if amd_failed else "None")
161
+ nvidia_failed_info = "Fails on NVIDIA:\n────────────────\n" + ("\n".join(nvidia_failed) if nvidia_failed else "None")
162
 
163
  return fig, amd_failed_info, nvidia_failed_info
164
 
 
347
  margin-left: 300px !important;
348
  }
349
 
350
+ /* Failed tests display - seamless appearance */
351
+ .failed-tests textarea {
352
+ background-color: #000000 !important;
353
+ color: #FFFFFF !important;
354
  font-family: monospace !important;
355
+ font-size: 14px !important;
356
+ border: none !important;
357
+ padding: 10px !important;
358
+ outline: none !important;
359
+ line-height: 1.4 !important;
 
 
 
360
  }
361
+
362
+ .failed-tests {
363
+ background-color: #000000 !important;
364
+ }
365
+
366
+ .failed-tests .gr-textbox {
367
+ background-color: #000000 !important;
368
+ border: none !important;
369
+ }
370
+
371
  """
372
 
373
  # Create the Gradio interface with sidebar and dark theme
 
405
  with gr.Row():
406
  with gr.Column(scale=1):
407
  amd_failed_tests_output = gr.Textbox(
408
+ value="Fails on AMD:\n────────────\nnetwork_timeout\ngpu_initialization\nmemory_overflow",
409
+ lines=6,
 
 
410
  interactive=False,
411
+ container=False,
412
  elem_classes=["failed-tests"]
413
  )
414
  with gr.Column(scale=1):
415
  nvidia_failed_tests_output = gr.Textbox(
416
+ value="Fails on NVIDIA:\n────────────────\ndistributed\nmulti_gpu\ndriver_conflict",
417
+ lines=6,
 
 
418
  interactive=False,
419
+ container=False,
420
  elem_classes=["failed-tests"]
421
  )
422