Spaces:
Sleeping
Sleeping
Added red text for failing models
Browse files- app.py +36 -1
- styles.css +11 -0
app.py
CHANGED
|
@@ -23,6 +23,35 @@ Ci_results.load_data()
|
|
| 23 |
Ci_results.schedule_data_reload()
|
| 24 |
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
# Function to get current description text
|
| 27 |
def get_description_text():
|
| 28 |
"""Get description text with integrated last update time."""
|
|
@@ -79,11 +108,17 @@ with gr.Blocks(title="Model Test Results Dashboard", css=load_css()) as demo:
|
|
| 79 |
model_choices = [model.lower() for model in Ci_results.available_models] if Ci_results.available_models else ["auto", "bert", "clip", "llama"]
|
| 80 |
|
| 81 |
for model_name in model_choices:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
btn = gr.Button(
|
| 83 |
model_name,
|
| 84 |
variant="secondary",
|
| 85 |
size="sm",
|
| 86 |
-
elem_classes=
|
| 87 |
)
|
| 88 |
model_buttons.append(btn)
|
| 89 |
|
|
|
|
| 23 |
Ci_results.schedule_data_reload()
|
| 24 |
|
| 25 |
|
| 26 |
+
# Function to check if a model has failures
|
| 27 |
+
def model_has_failures(model_name):
|
| 28 |
+
"""Check if a model has any failures (AMD or NVIDIA)."""
|
| 29 |
+
if Ci_results.df is None or Ci_results.df.empty:
|
| 30 |
+
return False
|
| 31 |
+
|
| 32 |
+
# Normalize model name to match DataFrame index
|
| 33 |
+
model_name_lower = model_name.lower()
|
| 34 |
+
|
| 35 |
+
# Check if model exists in DataFrame
|
| 36 |
+
if model_name_lower not in Ci_results.df.index:
|
| 37 |
+
return False
|
| 38 |
+
|
| 39 |
+
try:
|
| 40 |
+
row = Ci_results.df.loc[model_name_lower]
|
| 41 |
+
|
| 42 |
+
# Check for failures in both AMD and NVIDIA
|
| 43 |
+
amd_multi_failures = row.get('failed_multi_no_amd', 0) or 0
|
| 44 |
+
amd_single_failures = row.get('failed_single_no_amd', 0) or 0
|
| 45 |
+
nvidia_multi_failures = row.get('failed_multi_no_nvidia', 0) or 0
|
| 46 |
+
nvidia_single_failures = row.get('failed_single_no_nvidia', 0) or 0
|
| 47 |
+
|
| 48 |
+
total_failures = amd_multi_failures + amd_single_failures + nvidia_multi_failures + nvidia_single_failures
|
| 49 |
+
return total_failures > 0
|
| 50 |
+
|
| 51 |
+
except Exception:
|
| 52 |
+
return False
|
| 53 |
+
|
| 54 |
+
|
| 55 |
# Function to get current description text
|
| 56 |
def get_description_text():
|
| 57 |
"""Get description text with integrated last update time."""
|
|
|
|
| 108 |
model_choices = [model.lower() for model in Ci_results.available_models] if Ci_results.available_models else ["auto", "bert", "clip", "llama"]
|
| 109 |
|
| 110 |
for model_name in model_choices:
|
| 111 |
+
# Check if model has failures to determine styling
|
| 112 |
+
has_failures = model_has_failures(model_name)
|
| 113 |
+
button_classes = ["model-button"]
|
| 114 |
+
if has_failures:
|
| 115 |
+
button_classes.append("model-button-failed")
|
| 116 |
+
|
| 117 |
btn = gr.Button(
|
| 118 |
model_name,
|
| 119 |
variant="secondary",
|
| 120 |
size="sm",
|
| 121 |
+
elem_classes=button_classes
|
| 122 |
)
|
| 123 |
model_buttons.append(btn)
|
| 124 |
|
styles.css
CHANGED
|
@@ -184,6 +184,17 @@ div[data-testid="column"]:has(.model-container) {
|
|
| 184 |
box-shadow: 0 2px 8px rgba(116, 185, 255, 0.2) !important;
|
| 185 |
}
|
| 186 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 187 |
/*
|
| 188 |
.model-button:active {
|
| 189 |
background: linear-gradient(135deg, #2a2a2a, #1e1e1e) !important;
|
|
|
|
| 184 |
box-shadow: 0 2px 8px rgba(116, 185, 255, 0.2) !important;
|
| 185 |
}
|
| 186 |
|
| 187 |
+
/* Model buttons with failures - fuzzy red border with inner glow */
|
| 188 |
+
.model-button-failed {
|
| 189 |
+
border: 1px solid #712626 !important;
|
| 190 |
+
box-shadow: inset 0 0 8px rgba(204, 68, 68, 0.4) !important;
|
| 191 |
+
}
|
| 192 |
+
|
| 193 |
+
.model-button-failed:hover {
|
| 194 |
+
border-color: #712626 !important;
|
| 195 |
+
box-shadow: 0 0 12px rgba(255, 107, 107, 0.5) !important;
|
| 196 |
+
}
|
| 197 |
+
|
| 198 |
/*
|
| 199 |
.model-button:active {
|
| 200 |
background: linear-gradient(135deg, #2a2a2a, #1e1e1e) !important;
|