choco9966 commited on
Commit
336d66c
1 Parent(s): e2385ab

Update src/load_from_hub.py

Browse files
Files changed (1) hide show
  1. src/load_from_hub.py +4 -1
src/load_from_hub.py CHANGED
@@ -123,10 +123,13 @@ def get_evaluation_queue_df(
123
  pending_list = [e for e in all_evals if e["status"] in ["PENDING", "RERUN"]]
124
  running_list = [e for e in all_evals if e["status"] == "RUNNING"]
125
  finished_list = [e for e in all_evals if e["status"].startswith("FINISHED") or e["status"] == "PENDING_NEW_EVAL"]
 
126
  df_pending = pd.DataFrame.from_records(pending_list, columns=cols)
127
  df_running = pd.DataFrame.from_records(running_list, columns=cols)
128
  df_finished = pd.DataFrame.from_records(finished_list, columns=cols)
129
- return df_finished[cols], df_running[cols], df_pending[cols]
 
 
130
 
131
 
132
  def is_model_on_hub(model_name: str, revision: str) -> bool:
 
123
  pending_list = [e for e in all_evals if e["status"] in ["PENDING", "RERUN"]]
124
  running_list = [e for e in all_evals if e["status"] == "RUNNING"]
125
  finished_list = [e for e in all_evals if e["status"].startswith("FINISHED") or e["status"] == "PENDING_NEW_EVAL"]
126
+ failed_list = [e for e in all_evals if e["status"] == "FAILED"]
127
  df_pending = pd.DataFrame.from_records(pending_list, columns=cols)
128
  df_running = pd.DataFrame.from_records(running_list, columns=cols)
129
  df_finished = pd.DataFrame.from_records(finished_list, columns=cols)
130
+ df_failed = pd.DataFrame.from_records(failed_list, columns=cols)
131
+ return df_finished[cols], df_running[cols], df_pending[cols], df_failed[cols]
132
+
133
 
134
 
135
  def is_model_on_hub(model_name: str, revision: str) -> bool: