Gregor Betz commited on
Commit
fb90450
1 Parent(s): 9218171

sort pending by date

Browse files
Files changed (1) hide show
  1. src/populate.py +1 -0
src/populate.py CHANGED
@@ -48,6 +48,7 @@ def get_evaluation_queue_df(save_path: str, cols: list) -> list[pd.DataFrame]:
48
  all_evals.append(data)
49
 
50
  pending_list = [e for e in all_evals if e["status"] in ["PENDING", "RERUN"]]
 
51
  running_list = [e for e in all_evals if e["status"] == "RUNNING"]
52
  finished_list = [e for e in all_evals if e["status"].startswith("FINISHED") or e["status"] == "PENDING_NEW_EVAL"]
53
  df_pending = pd.DataFrame.from_records(pending_list, columns=cols)
 
48
  all_evals.append(data)
49
 
50
  pending_list = [e for e in all_evals if e["status"] in ["PENDING", "RERUN"]]
51
+ pending_list = sorted(pending_list, key=lambda x: x.get("date","ZZZ"))
52
  running_list = [e for e in all_evals if e["status"] == "RUNNING"]
53
  finished_list = [e for e in all_evals if e["status"].startswith("FINISHED") or e["status"] == "PENDING_NEW_EVAL"]
54
  df_pending = pd.DataFrame.from_records(pending_list, columns=cols)