jing084 commited on
Commit
cf58362
·
verified ·
1 Parent(s): eced67f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -15
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
- gsm8k_e2e = metrics.get("gsm8k_e2e_s", None)
38
- gsm8k_bs = metrics.get("gsm8k_bs", None)
39
- gsm8k_gpu = metrics.get("gpu_type", "")
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
- "GSM8K<br>E2E(s)": f2(gsm8k_e2e),
65
- "GSM8K<br>bs": gsm8k_bs,
66
- "GSM8K<br>GPU": gsm8k_gpu,
67
- "GSM8K<br>Accuracy(%)": pct(acc),
68
- "GSM8K<br>Decoding T/s": f2(metrics.get("decoding_throughput")),
69
- "GSM8K<br>Prefill T/s": f2(metrics.get("prefill_tp")),
70
- "GSM8K<br>Prefill<br>S-MBU(%)": pct(metrics.get("prefill_smbu")),
71
- "GSM8K<br>Prefill<br>S-MFU(%)": pct(metrics.get("prefill_smfu")),
72
- "GSM8K<br>Decoding<br>S-MBU(%)": pct(metrics.get("decoding_smbu")),
73
- "GSM8K<br>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,11 +198,13 @@ def load_from_dir(
198
 
199
  # Model type filter
200
  if selected_model_types:
201
- df = df[df["Model type"].isin(selected_model_types)]
 
202
 
203
  # Precision filter
204
  if selected_precisions:
205
- df = df[df["Precision"].isin(selected_precisions)]
 
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>"