Update
Browse files
app.py
CHANGED
@@ -71,6 +71,7 @@ for cat, bug_ids in bug_id_by_cat.items():
|
|
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)
|
76 |
model_cnt += 1
|
@@ -78,6 +79,7 @@ for row in LEADERBOARD_DF.itertuples():
|
|
78 |
timeline_ys.append(-model_cnt)
|
79 |
timeline_cols.append(row.method_id)
|
80 |
timeline_bugids.append(fix)
|
|
|
81 |
timeline_bugtypes = []
|
82 |
for bug_id in timeline_bugids:
|
83 |
timeline_xs.append(bug_id_to_time[bug_id])
|
@@ -91,6 +93,20 @@ timeline_df = pd.DataFrame(
|
|
91 |
"bug_type": timeline_bugtypes,
|
92 |
}
|
93 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
|
95 |
|
96 |
def init_leaderboard(dataframe):
|
@@ -133,6 +149,7 @@ with demo:
|
|
133 |
y_lim=(-model_cnt - 1, 4),
|
134 |
tooltip=["bug_id", "method_name", "time", "bug_type"],
|
135 |
)
|
|
|
136 |
|
137 |
with gr.TabItem("🚀 Submission", elem_id="llm-benchmark-tab-table", id=1):
|
138 |
gr.Markdown(EVALUATION_QUEUE_TEXT, elem_classes="markdown-text")
|
|
|
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 |
+
fixed_bug_ids = set()
|
75 |
for row in LEADERBOARD_DF.itertuples():
|
76 |
print(row)
|
77 |
model_cnt += 1
|
|
|
79 |
timeline_ys.append(-model_cnt)
|
80 |
timeline_cols.append(row.method_id)
|
81 |
timeline_bugids.append(fix)
|
82 |
+
fixed_bug_ids.add(fix)
|
83 |
timeline_bugtypes = []
|
84 |
for bug_id in timeline_bugids:
|
85 |
timeline_xs.append(bug_id_to_time[bug_id])
|
|
|
93 |
"bug_type": timeline_bugtypes,
|
94 |
}
|
95 |
)
|
96 |
+
fixed_by_cat = dict()
|
97 |
+
for bug_id in fixed_bug_ids:
|
98 |
+
fixed_by_cat[bug_id_to_type[bug_id]] = fixed_by_cat.get(bug_id_to_type[bug_id], 0) + 1
|
99 |
+
fixed_by_cat_df = pd.DataFrame(
|
100 |
+
{
|
101 |
+
"Category": [str(cat).capitalize() for cat in fixed_by_cat.keys()],
|
102 |
+
"Total": [len(bug_id_by_cat[cat]) for cat in fixed_by_cat.keys()],
|
103 |
+
"Repaired": list(fixed_by_cat.values()),
|
104 |
+
"Repair Rate (%)": [
|
105 |
+
round(fixed_by_cat[cat] / len(bug_id_by_cat[cat]) * 100, 1) for cat in fixed_by_cat.keys()
|
106 |
+
],
|
107 |
+
}
|
108 |
+
)
|
109 |
+
fixed_by_cat_df.sort_values("Category", inplace=True)
|
110 |
|
111 |
|
112 |
def init_leaderboard(dataframe):
|
|
|
149 |
y_lim=(-model_cnt - 1, 4),
|
150 |
tooltip=["bug_id", "method_name", "time", "bug_type"],
|
151 |
)
|
152 |
+
gr.Dataframe(fixed_by_cat_df)
|
153 |
|
154 |
with gr.TabItem("🚀 Submission", elem_id="llm-benchmark-tab-table", id=1):
|
155 |
gr.Markdown(EVALUATION_QUEUE_TEXT, elem_classes="markdown-text")
|