BenchmarkBot commited on
Commit
930b7c1
β€’
1 Parent(s): 7d87f75

added H4 score

Browse files
Files changed (1) hide show
  1. app.py +14 -8
app.py CHANGED
@@ -17,10 +17,10 @@ COLUMNS_MAPPING = {
17
  "model": "Model πŸ€—",
18
  "backend.name": "Backend 🏭",
19
  "backend.torch_dtype": "Datatype πŸ“₯",
20
- "generate.latency(s)": "Latency (s) ⬇️",
21
  "generate.throughput(tokens/s)": "Throughput (tokens/s) ⬆️",
22
  }
23
- COLUMNS_DATATYPES = ["markdown", "str", "str", "number", "number"]
24
  SORTING_COLUMN = ["Throughput (tokens/s) ⬆️"]
25
 
26
 
@@ -32,18 +32,24 @@ def get_benchmark_df(benchmark):
32
  llm_perf_dataset_repo.git_pull()
33
 
34
  # load
35
- df = pd.read_csv(
36
  f"./llm-perf-dataset/reports/{benchmark}/inference_report.csv")
 
 
 
 
 
 
37
  # preprocess
38
- df["model"] = df["model"].apply(make_clickable_model)
39
  # filter
40
- df = df[list(COLUMNS_MAPPING.keys())]
41
  # rename
42
- df.rename(columns=COLUMNS_MAPPING, inplace=True)
43
  # sort
44
- df.sort_values(by=SORTING_COLUMN, ascending=False, inplace=True)
45
 
46
- return df
47
 
48
 
49
  def change_tab(query_param):
 
17
  "model": "Model πŸ€—",
18
  "backend.name": "Backend 🏭",
19
  "backend.torch_dtype": "Datatype πŸ“₯",
20
+ "average": "Average H4 Score ⬆️",
21
  "generate.throughput(tokens/s)": "Throughput (tokens/s) ⬆️",
22
  }
23
+ COLUMNS_DATATYPES = ["markdown", "str", "str", "number", "number", "number"]
24
  SORTING_COLUMN = ["Throughput (tokens/s) ⬆️"]
25
 
26
 
 
32
  llm_perf_dataset_repo.git_pull()
33
 
34
  # load
35
+ bench_df = pd.read_csv(
36
  f"./llm-perf-dataset/reports/{benchmark}/inference_report.csv")
37
+ scores_df = pd.read_csv(
38
+ f"./llm-perf-dataset/reports/average_scores.csv")
39
+ # merge on model
40
+ bench_df = bench_df.merge(
41
+ scores_df, how="left", left_on="model", right_on="model")
42
+
43
  # preprocess
44
+ bench_df["model"] = bench_df["model"].apply(make_clickable_model)
45
  # filter
46
+ bench_df = bench_df[list(COLUMNS_MAPPING.keys())]
47
  # rename
48
+ bench_df.rename(columns=COLUMNS_MAPPING, inplace=True)
49
  # sort
50
+ bench_df.sort_values(by=SORTING_COLUMN, ascending=False, inplace=True)
51
 
52
+ return bench_df
53
 
54
 
55
  def change_tab(query_param):