Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,9 +34,9 @@ def json_to_row(path: str, metrics: dict) -> dict:
|
|
| 34 |
precision = metrics.get("precision", "Unknown")
|
| 35 |
model_type = metrics.get("model_type", "Unknown")
|
| 36 |
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
|
| 41 |
em = metrics.get("exact_match")
|
| 42 |
correct = metrics.get("correct")
|
|
@@ -61,16 +61,16 @@ def json_to_row(path: str, metrics: dict) -> dict:
|
|
| 61 |
"Method": method,
|
| 62 |
"Model type": model_type,
|
| 63 |
"Precision": precision,
|
| 64 |
-
"
|
| 65 |
-
"
|
| 66 |
-
"
|
| 67 |
-
"
|
| 68 |
-
"
|
| 69 |
-
"
|
| 70 |
-
"
|
| 71 |
-
"
|
| 72 |
-
"
|
| 73 |
-
"
|
| 74 |
"TTFT(s)": f2(metrics.get("ttft")),
|
| 75 |
"TPOT(s)": f2(metrics.get("tpot")),
|
| 76 |
}
|
|
@@ -198,11 +198,13 @@ def load_from_dir(
|
|
| 198 |
|
| 199 |
# Model type filter
|
| 200 |
if selected_model_types:
|
| 201 |
-
|
|
|
|
| 202 |
|
| 203 |
# Precision filter
|
| 204 |
if selected_precisions:
|
| 205 |
-
|
|
|
|
| 206 |
|
| 207 |
if df.empty:
|
| 208 |
empty_html = "<p>No records found.</p>"
|
|
|
|
| 34 |
precision = metrics.get("precision", "Unknown")
|
| 35 |
model_type = metrics.get("model_type", "Unknown")
|
| 36 |
|
| 37 |
+
e2e_s = metrics.get("e2e_s", None)
|
| 38 |
+
batch_size = metrics.get("batch_size", None)
|
| 39 |
+
gpu_type = metrics.get("gpu_type", "")
|
| 40 |
|
| 41 |
em = metrics.get("exact_match")
|
| 42 |
correct = metrics.get("correct")
|
|
|
|
| 61 |
"Method": method,
|
| 62 |
"Model type": model_type,
|
| 63 |
"Precision": precision,
|
| 64 |
+
"E2E(s)": f2(e2e_s),
|
| 65 |
+
"Batch size": batch_size,
|
| 66 |
+
"GPU": gpu_type,
|
| 67 |
+
"Accuracy(%)": pct(acc),
|
| 68 |
+
"Decoding T/s": f2(metrics.get("decoding_throughput")),
|
| 69 |
+
"Prefill T/s": f2(metrics.get("prefill_tp")),
|
| 70 |
+
"Prefill<br>S-MBU(%)": pct(metrics.get("prefill_smbu")),
|
| 71 |
+
"Prefill<br>S-MFU(%)": pct(metrics.get("prefill_smfu")),
|
| 72 |
+
"Decoding<br>S-MBU(%)": pct(metrics.get("decoding_smbu")),
|
| 73 |
+
"Decoding<br>S-MFU(%)": pct(metrics.get("decoding_smfu")),
|
| 74 |
"TTFT(s)": f2(metrics.get("ttft")),
|
| 75 |
"TPOT(s)": f2(metrics.get("tpot")),
|
| 76 |
}
|
|
|
|
| 198 |
|
| 199 |
# Model type filter
|
| 200 |
if selected_model_types:
|
| 201 |
+
lower_selected = [str(x).lower() for x in selected_model_types]
|
| 202 |
+
df = df[df["Model type"].astype(str).str.lower().isin(lower_selected)]
|
| 203 |
|
| 204 |
# Precision filter
|
| 205 |
if selected_precisions:
|
| 206 |
+
lower_selected = [str(x).lower() for x in selected_precisions]
|
| 207 |
+
df = df[df["Precision"].astype(str).str.lower().isin(lower_selected)]
|
| 208 |
|
| 209 |
if df.empty:
|
| 210 |
empty_html = "<p>No records found.</p>"
|