ycy commited on
Commit
cee73a2
·
1 Parent(s): 3ef5e2a
Files changed (1) hide show
  1. src/populate.py +4 -3
src/populate.py CHANGED
@@ -70,9 +70,10 @@ def get_evaluation_queue_df(save_path: str, cols: list) -> list[pd.DataFrame]:
70
  for entry in entries:
71
  if ".json" in entry:
72
  file_path = os.path.join(save_path, entry)
73
- print(file_path)
74
- assert 0
75
- with open(file_path) as fp:
 
76
  data = json.load(fp)
77
 
78
  data[EvalQueueColumn.model.name] = make_clickable_model(data["model"])
 
70
  for entry in entries:
71
  if ".json" in entry:
72
  file_path = os.path.join(save_path, entry)
73
+ with open(file_path, encoding="utf-8") as fp:
74
+ if os.path.getsize(file_path) == 0:
75
+ print(f"Warning: {file_path} is empty.")
76
+ continue
77
  data = json.load(fp)
78
 
79
  data[EvalQueueColumn.model.name] = make_clickable_model(data["model"])