dtcxzyw commited on
Commit
64fc239
·
unverified ·
1 Parent(s): 8dda11e
Files changed (1) hide show
  1. app.py +15 -0
app.py CHANGED
@@ -44,8 +44,14 @@ except Exception:
44
  dataset = load_dataset("dtcxzyw/llvm-apr-benchmark")
45
  total_issues = dataset.num_rows["test"]
46
  bug_id_to_time = dict()
 
 
 
 
 
47
  for issue in dataset["test"]:
48
  bug_id_to_time[issue["bug_id"]] = pd.to_datetime(issue["knowledge_cutoff"])
 
49
  timeline_xs = []
50
  timeline_ys = []
51
  timeline_cols = []
@@ -56,6 +62,14 @@ for bug_id, time in bug_id_to_time.items():
56
  timeline_ys.append(0)
57
  timeline_cols.append("All")
58
  timeline_bugids.append(bug_id)
 
 
 
 
 
 
 
 
59
  LEADERBOARD_DF = get_leaderboard_df(EVAL_REQUESTS_PATH, total_issues)
60
  for row in LEADERBOARD_DF.itertuples():
61
  print(row)
@@ -113,6 +127,7 @@ with demo:
113
  y_label="Model",
114
  title="Timeline",
115
  y_lim=(-model_cnt - 1, 1),
 
116
  )
117
 
118
  with gr.TabItem("🚀 Submission", elem_id="llm-benchmark-tab-table", id=1):
 
44
  dataset = load_dataset("dtcxzyw/llvm-apr-benchmark")
45
  total_issues = dataset.num_rows["test"]
46
  bug_id_to_time = dict()
47
+ bug_id_by_cat = {
48
+ "crash": [],
49
+ "miscompilation": [],
50
+ "hang": [],
51
+ }
52
  for issue in dataset["test"]:
53
  bug_id_to_time[issue["bug_id"]] = pd.to_datetime(issue["knowledge_cutoff"])
54
+ bug_id_by_cat[issue["bug_type"]].append(issue["bug_id"])
55
  timeline_xs = []
56
  timeline_ys = []
57
  timeline_cols = []
 
62
  timeline_ys.append(0)
63
  timeline_cols.append("All")
64
  timeline_bugids.append(bug_id)
65
+ cat_cnt = 4
66
+ for cat, bug_ids in bug_id_by_cat.items():
67
+ cat_cnt -= 1
68
+ for bug_id in bug_ids:
69
+ timeline_xs.append(bug_id_to_time[bug_id])
70
+ timeline_ys.append(cat_cnt)
71
+ timeline_cols.append(str(cat).capitalize())
72
+ timeline_bugids.append(bug_id)
73
  LEADERBOARD_DF = get_leaderboard_df(EVAL_REQUESTS_PATH, total_issues)
74
  for row in LEADERBOARD_DF.itertuples():
75
  print(row)
 
127
  y_label="Model",
128
  title="Timeline",
129
  y_lim=(-model_cnt - 1, 1),
130
+ tooltip=["bug_id", "method_name", "time"],
131
  )
132
 
133
  with gr.TabItem("🚀 Submission", elem_id="llm-benchmark-tab-table", id=1):