Spaces:
Starting
on
CPU Upgrade
Starting
on
CPU Upgrade
eduagarcia
commited on
Commit
•
ebb5810
1
Parent(s):
ff9ccb0
Add FAILED evaluations dropdown
Browse files- app.py +14 -2
- src/populate.py +3 -1
app.py
CHANGED
@@ -90,11 +90,12 @@ def init_space():
|
|
90 |
finished_eval_queue_df,
|
91 |
running_eval_queue_df,
|
92 |
pending_eval_queue_df,
|
|
|
93 |
) = get_evaluation_queue_df(EVAL_REQUESTS_PATH, EVAL_COLS)
|
94 |
|
95 |
-
return leaderboard_df, original_df, plot_df, finished_eval_queue_df, running_eval_queue_df, pending_eval_queue_df
|
96 |
|
97 |
-
leaderboard_df, original_df, plot_df, finished_eval_queue_df, running_eval_queue_df, pending_eval_queue_df = init_space()
|
98 |
|
99 |
|
100 |
# Searching and filtering
|
@@ -403,6 +404,17 @@ with demo:
|
|
403 |
datatype=EVAL_TYPES,
|
404 |
row_count=5,
|
405 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
406 |
with gr.Row():
|
407 |
gr.Markdown("# ✉️✨ Submit your model here!", elem_classes="markdown-text")
|
408 |
|
|
|
90 |
finished_eval_queue_df,
|
91 |
running_eval_queue_df,
|
92 |
pending_eval_queue_df,
|
93 |
+
failed_eval_queue_df
|
94 |
) = get_evaluation_queue_df(EVAL_REQUESTS_PATH, EVAL_COLS)
|
95 |
|
96 |
+
return leaderboard_df, original_df, plot_df, finished_eval_queue_df, running_eval_queue_df, pending_eval_queue_df, failed_eval_queue_df
|
97 |
|
98 |
+
leaderboard_df, original_df, plot_df, finished_eval_queue_df, running_eval_queue_df, pending_eval_queue_df, failed_eval_queue_df = init_space()
|
99 |
|
100 |
|
101 |
# Searching and filtering
|
|
|
404 |
datatype=EVAL_TYPES,
|
405 |
row_count=5,
|
406 |
)
|
407 |
+
with gr.Accordion(
|
408 |
+
f"❌ Failed Evaluations ({len(failed_eval_queue_df)})",
|
409 |
+
open=False,
|
410 |
+
):
|
411 |
+
with gr.Row():
|
412 |
+
failed_eval_table = gr.components.Dataframe(
|
413 |
+
value=failed_eval_queue_df,
|
414 |
+
headers=EVAL_COLS,
|
415 |
+
datatype=EVAL_TYPES,
|
416 |
+
row_count=5,
|
417 |
+
)
|
418 |
with gr.Row():
|
419 |
gr.Markdown("# ✉️✨ Submit your model here!", elem_classes="markdown-text")
|
420 |
|
src/populate.py
CHANGED
@@ -54,7 +54,9 @@ def get_evaluation_queue_df(save_path: str, cols: list) -> list[pd.DataFrame]:
|
|
54 |
pending_list = [e for e in all_evals if e["status"] in ["PENDING", "RERUN"]]
|
55 |
running_list = [e for e in all_evals if e["status"] == "RUNNING"]
|
56 |
finished_list = [e for e in all_evals if e["status"].startswith("FINISHED") or e["status"] == "PENDING_NEW_EVAL"]
|
|
|
57 |
df_pending = pd.DataFrame.from_records(pending_list, columns=cols)
|
58 |
df_running = pd.DataFrame.from_records(running_list, columns=cols)
|
59 |
df_finished = pd.DataFrame.from_records(finished_list, columns=cols)
|
60 |
-
|
|
|
|
54 |
pending_list = [e for e in all_evals if e["status"] in ["PENDING", "RERUN"]]
|
55 |
running_list = [e for e in all_evals if e["status"] == "RUNNING"]
|
56 |
finished_list = [e for e in all_evals if e["status"].startswith("FINISHED") or e["status"] == "PENDING_NEW_EVAL"]
|
57 |
+
failed_list = [e for e in all_evals if e["status"] == "FAILED"]
|
58 |
df_pending = pd.DataFrame.from_records(pending_list, columns=cols)
|
59 |
df_running = pd.DataFrame.from_records(running_list, columns=cols)
|
60 |
df_finished = pd.DataFrame.from_records(finished_list, columns=cols)
|
61 |
+
df_failed = pd.DataFrame.from_records(failed_list, columns=cols)
|
62 |
+
return df_finished[cols], df_running[cols], df_pending[cols], df_failed[cols]
|