ror HF Staff commited on
Commit
a8d2652
·
1 Parent(s): ab88628

Verison 0.3

Browse files
Files changed (1) hide show
  1. app.py +128 -15
app.py CHANGED
@@ -55,6 +55,76 @@ MODELS = {
55
  "skipped": [],
56
  "error": ["system_crash"]
57
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  }
59
  }
60
 
@@ -225,7 +295,7 @@ def get_model_stats_summary(model_name: str) -> tuple:
225
 
226
  def create_summary_page() -> plt.Figure:
227
  """Create a summary page with model names and both AMD/NVIDIA test stats bars."""
228
- fig, ax = plt.subplots(figsize=(12, len(MODELS) * 4 + 1), facecolor='#000000')
229
  ax.set_facecolor('#000000')
230
 
231
  colors = {
@@ -235,6 +305,8 @@ def create_summary_page() -> plt.Figure:
235
  'error': '#8B0000'
236
  }
237
 
 
 
238
  for i, (model_name, model_data) in enumerate(MODELS.items()):
239
  # Process AMD and NVIDIA data
240
  amd_stats = {k: len(v) for k, v in model_data['amd'].items()}
@@ -245,11 +317,12 @@ def create_summary_page() -> plt.Figure:
245
  if amd_total == 0 and nvidia_total == 0:
246
  continue
247
 
248
- # Position for this model - tighter spacing between groups
249
- y_base = i * 2
250
  y_model_name = y_base # Model name above AMD bar
251
  y_amd_bar = y_base + 0.45 # AMD bar
252
  y_nvidia_bar = y_base + 0.97 # NVIDIA bar
 
253
 
254
  # Model name centered above the AMD bar
255
  left_0 = 8
@@ -260,7 +333,7 @@ def create_summary_page() -> plt.Figure:
260
 
261
  # AMD label and bar on the same level
262
  if amd_total > 0:
263
- ax.text(left_0 - 2, y_amd_bar, "AMD",
264
  ha='right', va='center', color='#CCCCCC',
265
  fontsize=18, fontfamily='monospace', fontweight='normal')
266
 
@@ -269,7 +342,7 @@ def create_summary_page() -> plt.Figure:
269
  for category in ['passed', 'failed', 'skipped', 'error']:
270
  if amd_stats[category] > 0:
271
  width = amd_stats[category] / amd_total * bar_length
272
- ax.barh(y_amd_bar, width, left=left, height=0.45,
273
  color=colors[category], alpha=0.9)
274
  if width > 4:
275
  ax.text(left + width/2, y_amd_bar, str(amd_stats[category]),
@@ -279,7 +352,7 @@ def create_summary_page() -> plt.Figure:
279
 
280
  # NVIDIA label and bar on the same level
281
  if nvidia_total > 0:
282
- ax.text(left_0 - 2, y_nvidia_bar, "NVIDIA",
283
  ha='right', va='center', color='#CCCCCC',
284
  fontsize=18, fontfamily='monospace', fontweight='normal')
285
 
@@ -288,17 +361,20 @@ def create_summary_page() -> plt.Figure:
288
  for category in ['passed', 'failed', 'skipped', 'error']:
289
  if nvidia_stats[category] > 0:
290
  width = nvidia_stats[category] / nvidia_total * bar_length
291
- ax.barh(y_nvidia_bar, width, left=left, height=0.45,
292
  color=colors[category], alpha=0.9)
293
  if width > 4:
294
  ax.text(left + width/2, y_nvidia_bar, str(nvidia_stats[category]),
295
  ha='center', va='center', color='black',
296
  fontweight='bold', fontsize=12, fontfamily='monospace')
297
  left += width
 
 
 
298
 
299
  # Style the axes to be completely invisible and span full width
300
  ax.set_xlim(0, 100)
301
- ax.set_ylim(-1, len(MODELS) * 3.2)
302
  ax.set_xlabel('')
303
  ax.set_ylabel('')
304
  ax.spines['bottom'].set_visible(False)
@@ -431,8 +507,46 @@ dark_theme_css = """
431
  .success-medium { background-color: #FF9800 !important; }
432
  .success-low { background-color: #F44336 !important; }
433
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
434
  /* Regular button styling for non-model buttons */
435
- .gr-button:not(.model-button) {
436
  background-color: #222222 !important;
437
  color: white !important;
438
  border: 1px solid #444444 !important;
@@ -441,7 +555,7 @@ dark_theme_css = """
441
  transition: all 0.3s ease !important;
442
  }
443
 
444
- .gr-button:not(.model-button):hover {
445
  background-color: #333333 !important;
446
  border-color: #666666 !important;
447
  }
@@ -740,15 +854,15 @@ with gr.Blocks(title="Model Test Results Dashboard", css=dark_theme_css) as demo
740
  with gr.Row():
741
  # Sidebar for model selection
742
  with gr.Column(scale=1, elem_classes=["sidebar"]):
743
- gr.Markdown("# 🤖 AI Models")
744
- gr.Markdown("**Select a model to analyze test results**\n\n*Interactive dashboard with detailed metrics*")
745
 
746
  # Summary button at the top
747
  summary_button = gr.Button(
748
- "summary",
749
  variant="primary",
750
  size="lg",
751
- elem_classes=["model-button"]
752
  )
753
 
754
  # Model selection buttons in sidebar
@@ -775,7 +889,6 @@ with gr.Blocks(title="Model Test Results Dashboard", css=dark_theme_css) as demo
775
 
776
  # Detailed view components (hidden by default)
777
  with gr.Column(visible=False, elem_classes=["detail-view"]) as detail_view:
778
- gr.Markdown("# 📈 Test Results Dashboard")
779
 
780
  # Create the plot output
781
  plot_output = gr.Plot(
 
55
  "skipped": [],
56
  "error": ["system_crash"]
57
  }
58
+ },
59
+ "claude": {
60
+ "amd": {
61
+ "passed": ["auth_login", "data_validation", "api_response", "file_upload", "cache_hit", "user_permissions", "db_query", "session_mgmt", "input_sanitize", "rate_limit", "error_handling", "memory_alloc", "thread_safety", "backup_restore", "config_load", "log_rotation", "health_check", "metrics", "alerts", "monitoring", "security_scan", "password_hash", "jwt_token", "oauth_flow", "csrf_protect", "xss_filter", "sql_injection", "rate_limiter", "load_balance", "circuit_break"],
62
+ "failed": ["gpu_accel", "cuda_ops", "ml_inference", "distributed", "multi_gpu", "opencl_init", "driver_conflict"],
63
+ "skipped": ["tensor_ops", "perf_test", "stress_test", "load_test", "endurance", "benchmark"],
64
+ "error": ["memory_bandwidth"]
65
+ },
66
+ "nvidia": {
67
+ "passed": ["auth_login", "data_validation", "api_response", "file_upload", "cache_hit", "user_permissions", "db_query", "session_mgmt", "input_sanitize", "rate_limit", "error_handling", "memory_alloc", "thread_safety", "backup_restore", "config_load", "log_rotation", "health_check", "metrics", "alerts", "monitoring", "security_scan", "password_hash", "jwt_token", "oauth_flow", "csrf_protect", "xss_filter", "sql_injection", "rate_limiter", "load_balance", "circuit_break", "gpu_accel", "cuda_ops", "ml_inference", "tensor_ops"],
68
+ "failed": ["distributed", "multi_gpu", "cuda_version", "nvcc_compile"],
69
+ "skipped": ["perf_test", "stress_test", "load_test", "endurance"],
70
+ "error": []
71
+ }
72
+ },
73
+ "mistral": {
74
+ "amd": {
75
+ "passed": ["auth_login", "data_validation", "api_response", "file_upload", "cache_hit", "user_permissions", "db_query", "session_mgmt", "input_sanitize", "rate_limit", "error_handling", "memory_alloc", "thread_safety", "backup_restore", "config_load", "log_rotation", "health_check", "metrics", "alerts", "monitoring"],
76
+ "failed": ["gpu_accel", "cuda_ops", "ml_inference", "tensor_ops", "distributed", "multi_gpu", "opencl_init", "driver_conflict", "memory_bandwidth", "compute_units", "rocm_version", "hip_compile", "kernel_launch"],
77
+ "skipped": ["security_scan", "password_hash", "jwt_token", "oauth_flow", "csrf_protect", "xss_filter", "sql_injection", "rate_limiter", "load_balance", "circuit_break"],
78
+ "error": ["buffer_transfer", "atomic_ops"]
79
+ },
80
+ "nvidia": {
81
+ "passed": ["auth_login", "data_validation", "api_response", "file_upload", "cache_hit", "user_permissions", "db_query", "session_mgmt", "input_sanitize", "rate_limit", "error_handling", "memory_alloc", "thread_safety", "backup_restore", "config_load", "log_rotation", "health_check", "metrics", "alerts", "monitoring", "gpu_accel", "cuda_ops", "ml_inference", "tensor_ops", "security_scan"],
82
+ "failed": ["distributed", "multi_gpu", "cuda_version", "nvcc_compile", "stream_sync", "device_reset"],
83
+ "skipped": ["password_hash", "jwt_token", "oauth_flow", "csrf_protect", "xss_filter", "sql_injection", "rate_limiter"],
84
+ "error": ["peer_access"]
85
+ }
86
+ },
87
+ "phi": {
88
+ "amd": {
89
+ "passed": ["auth_login", "data_validation", "api_response", "file_upload", "cache_hit", "user_permissions", "db_query", "session_mgmt", "input_sanitize", "rate_limit", "error_handling", "memory_alloc", "thread_safety", "backup_restore", "config_load", "log_rotation", "health_check", "metrics", "alerts", "monitoring", "security_scan", "password_hash", "jwt_token", "oauth_flow", "csrf_protect", "xss_filter", "sql_injection"],
90
+ "failed": ["gpu_accel", "cuda_ops", "ml_inference", "tensor_ops", "distributed", "multi_gpu", "opencl_init", "driver_conflict", "memory_bandwidth"],
91
+ "skipped": ["rate_limiter", "load_balance", "circuit_break", "retry_logic", "timeout_handle", "graceful_shutdown"],
92
+ "error": []
93
+ },
94
+ "nvidia": {
95
+ "passed": ["auth_login", "data_validation", "api_response", "file_upload", "cache_hit", "user_permissions", "db_query", "session_mgmt", "input_sanitize", "rate_limit", "error_handling", "memory_alloc", "thread_safety", "backup_restore", "config_load", "log_rotation", "health_check", "metrics", "alerts", "monitoring", "security_scan", "password_hash", "jwt_token", "oauth_flow", "csrf_protect", "xss_filter", "sql_injection", "gpu_accel", "cuda_ops", "ml_inference", "tensor_ops", "rate_limiter"],
96
+ "failed": ["distributed", "multi_gpu", "cuda_version"],
97
+ "skipped": ["load_balance", "circuit_break", "retry_logic", "timeout_handle"],
98
+ "error": []
99
+ }
100
+ },
101
+ "qwen": {
102
+ "amd": {
103
+ "passed": ["auth_login", "data_validation", "api_response", "file_upload", "cache_hit", "user_permissions", "db_query", "session_mgmt", "input_sanitize", "rate_limit", "error_handling", "memory_alloc", "thread_safety"],
104
+ "failed": ["backup_restore", "config_load", "log_rotation", "health_check", "metrics", "alerts", "monitoring", "security_scan", "password_hash", "jwt_token", "oauth_flow", "csrf_protect", "xss_filter", "sql_injection", "rate_limiter", "load_balance", "circuit_break", "gpu_accel", "cuda_ops", "ml_inference", "tensor_ops", "distributed", "multi_gpu"],
105
+ "skipped": ["retry_logic", "timeout_handle", "graceful_shutdown", "hot_reload", "config_watch"],
106
+ "error": ["env_vars", "secrets_mgmt", "tls_cert"]
107
+ },
108
+ "nvidia": {
109
+ "passed": ["auth_login", "data_validation", "api_response", "file_upload", "cache_hit", "user_permissions", "db_query", "session_mgmt", "input_sanitize", "rate_limit", "error_handling", "memory_alloc", "thread_safety", "backup_restore", "config_load", "gpu_accel", "cuda_ops", "ml_inference", "tensor_ops"],
110
+ "failed": ["log_rotation", "health_check", "metrics", "alerts", "monitoring", "security_scan", "password_hash", "jwt_token", "oauth_flow", "csrf_protect", "xss_filter", "sql_injection", "rate_limiter", "load_balance", "circuit_break", "distributed", "multi_gpu", "cuda_version", "nvcc_compile"],
111
+ "skipped": ["retry_logic", "timeout_handle", "graceful_shutdown", "hot_reload"],
112
+ "error": ["config_watch", "env_vars"]
113
+ }
114
+ },
115
+ "deepseek": {
116
+ "amd": {
117
+ "passed": ["auth_login", "data_validation", "api_response", "file_upload", "cache_hit", "user_permissions", "db_query", "session_mgmt", "input_sanitize", "rate_limit", "error_handling", "memory_alloc", "thread_safety", "backup_restore", "config_load", "log_rotation", "health_check", "metrics", "alerts", "monitoring", "security_scan", "password_hash", "jwt_token", "oauth_flow", "csrf_protect", "xss_filter", "sql_injection", "rate_limiter", "load_balance", "circuit_break", "retry_logic", "timeout_handle", "graceful_shutdown", "hot_reload", "config_watch", "env_vars", "secrets_mgmt", "tls_cert", "encryption", "compression"],
118
+ "failed": ["gpu_accel", "cuda_ops", "ml_inference", "tensor_ops", "opencl_init", "driver_conflict", "memory_bandwidth", "compute_units"],
119
+ "skipped": ["distributed", "multi_gpu", "serialization", "deserialization", "validation"],
120
+ "error": []
121
+ },
122
+ "nvidia": {
123
+ "passed": ["auth_login", "data_validation", "api_response", "file_upload", "cache_hit", "user_permissions", "db_query", "session_mgmt", "input_sanitize", "rate_limit", "error_handling", "memory_alloc", "thread_safety", "backup_restore", "config_load", "log_rotation", "health_check", "metrics", "alerts", "monitoring", "security_scan", "password_hash", "jwt_token", "oauth_flow", "csrf_protect", "xss_filter", "sql_injection", "rate_limiter", "load_balance", "circuit_break", "retry_logic", "timeout_handle", "graceful_shutdown", "hot_reload", "config_watch", "env_vars", "secrets_mgmt", "tls_cert", "encryption", "compression", "gpu_accel", "cuda_ops", "ml_inference", "tensor_ops"],
124
+ "failed": ["distributed", "multi_gpu"],
125
+ "skipped": ["serialization", "deserialization", "validation"],
126
+ "error": []
127
+ }
128
  }
129
  }
130
 
 
295
 
296
  def create_summary_page() -> plt.Figure:
297
  """Create a summary page with model names and both AMD/NVIDIA test stats bars."""
298
+ fig, ax = plt.subplots(figsize=(16, len(MODELS) * 2.5 + 2), facecolor='#000000')
299
  ax.set_facecolor('#000000')
300
 
301
  colors = {
 
305
  'error': '#8B0000'
306
  }
307
 
308
+ visible_model_count = 0
309
+ max_y = 0
310
  for i, (model_name, model_data) in enumerate(MODELS.items()):
311
  # Process AMD and NVIDIA data
312
  amd_stats = {k: len(v) for k, v in model_data['amd'].items()}
 
317
  if amd_total == 0 and nvidia_total == 0:
318
  continue
319
 
320
+ # Position for this model - use visible model count for spacing
321
+ y_base = (2.2 + visible_model_count) * 1.8
322
  y_model_name = y_base # Model name above AMD bar
323
  y_amd_bar = y_base + 0.45 # AMD bar
324
  y_nvidia_bar = y_base + 0.97 # NVIDIA bar
325
+ max_y = max(max_y, y_nvidia_bar + 0.5)
326
 
327
  # Model name centered above the AMD bar
328
  left_0 = 8
 
333
 
334
  # AMD label and bar on the same level
335
  if amd_total > 0:
336
+ ax.text(left_0 - 2, y_amd_bar, "amd",
337
  ha='right', va='center', color='#CCCCCC',
338
  fontsize=18, fontfamily='monospace', fontweight='normal')
339
 
 
342
  for category in ['passed', 'failed', 'skipped', 'error']:
343
  if amd_stats[category] > 0:
344
  width = amd_stats[category] / amd_total * bar_length
345
+ ax.barh(y_amd_bar, width, left=left, height=0.405,
346
  color=colors[category], alpha=0.9)
347
  if width > 4:
348
  ax.text(left + width/2, y_amd_bar, str(amd_stats[category]),
 
352
 
353
  # NVIDIA label and bar on the same level
354
  if nvidia_total > 0:
355
+ ax.text(left_0 - 2, y_nvidia_bar, "nvidia",
356
  ha='right', va='center', color='#CCCCCC',
357
  fontsize=18, fontfamily='monospace', fontweight='normal')
358
 
 
361
  for category in ['passed', 'failed', 'skipped', 'error']:
362
  if nvidia_stats[category] > 0:
363
  width = nvidia_stats[category] / nvidia_total * bar_length
364
+ ax.barh(y_nvidia_bar, width, left=left, height=0.405,
365
  color=colors[category], alpha=0.9)
366
  if width > 4:
367
  ax.text(left + width/2, y_nvidia_bar, str(nvidia_stats[category]),
368
  ha='center', va='center', color='black',
369
  fontweight='bold', fontsize=12, fontfamily='monospace')
370
  left += width
371
+
372
+ # Increment counter for next visible model
373
+ visible_model_count += 1
374
 
375
  # Style the axes to be completely invisible and span full width
376
  ax.set_xlim(0, 100)
377
+ ax.set_ylim(-0.5, max_y)
378
  ax.set_xlabel('')
379
  ax.set_ylabel('')
380
  ax.spines['bottom'].set_visible(False)
 
507
  .success-medium { background-color: #FF9800 !important; }
508
  .success-low { background-color: #F44336 !important; }
509
 
510
+ /* Summary button styling - distinct from model buttons */
511
+ .summary-button {
512
+ background: linear-gradient(135deg, #4a4a4a, #3e3e3e) !important;
513
+ color: white !important;
514
+ border: 2px solid #555555 !important;
515
+ margin: 2px 0 15px 0 !important;
516
+ border-radius: 5px !important;
517
+ padding: 12px 12px !important;
518
+ transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
519
+ position: relative !important;
520
+ overflow: hidden !important;
521
+ box-shadow:
522
+ 0 4px 15px rgba(0, 0, 0, 0.3),
523
+ inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
524
+ font-weight: 600 !important;
525
+ font-size: 16px !important;
526
+ text-transform: uppercase !important;
527
+ letter-spacing: 0.5px !important;
528
+ font-family: monospace !important;
529
+ height: 60px !important;
530
+ display: flex !important;
531
+ flex-direction: column !important;
532
+ justify-content: center !important;
533
+ align-items: center !important;
534
+ line-height: 1.2 !important;
535
+ }
536
+
537
+ .summary-button:hover {
538
+ background: linear-gradient(135deg, #5a5a5a, #4e4e4e) !important;
539
+ color: #74b9ff !important;
540
+ border-color: #666666 !important;
541
+ }
542
+
543
+ .summary-button:active {
544
+ background: linear-gradient(135deg, #4a4a4a, #3e3e3e) !important;
545
+ color: #5a9bd4 !important;
546
+ }
547
+
548
  /* Regular button styling for non-model buttons */
549
+ .gr-button:not(.model-button):not(.summary-button) {
550
  background-color: #222222 !important;
551
  color: white !important;
552
  border: 1px solid #444444 !important;
 
555
  transition: all 0.3s ease !important;
556
  }
557
 
558
+ .gr-button:not(.model-button):not(.summary-button):hover {
559
  background-color: #333333 !important;
560
  border-color: #666666 !important;
561
  }
 
854
  with gr.Row():
855
  # Sidebar for model selection
856
  with gr.Column(scale=1, elem_classes=["sidebar"]):
857
+ gr.Markdown("# 🤖 TCID")
858
+ gr.Markdown("**Transformer CI Dashboard**\n\n*Analyze transformers CI results across AMD and NVIDIA devices*\n")
859
 
860
  # Summary button at the top
861
  summary_button = gr.Button(
862
+ "summary\n📊",
863
  variant="primary",
864
  size="lg",
865
+ elem_classes=["summary-button"]
866
  )
867
 
868
  # Model selection buttons in sidebar
 
889
 
890
  # Detailed view components (hidden by default)
891
  with gr.Column(visible=False, elem_classes=["detail-view"]) as detail_view:
 
892
 
893
  # Create the plot output
894
  plot_output = gr.Plot(