meg-huggingface commited on
Commit
39456a9
1 Parent(s): 313cc30

Adding print debug statements

Browse files
Files changed (2) hide show
  1. src/leaderboard/read_evals.py +6 -0
  2. src/populate.py +4 -0
src/leaderboard/read_evals.py CHANGED
@@ -158,6 +158,8 @@ def get_raw_eval_results(results_path: str, requests_path: str) -> list[EvalResu
158
  """From the path of the results folder root, extract all needed info for results"""
159
  model_result_filepaths = []
160
 
 
 
161
  for root, _, files in os.walk(results_path):
162
  # We should only have json files in model results
163
  if len(files) == 0 or any([not f.endswith(".json") for f in files]):
@@ -172,6 +174,8 @@ def get_raw_eval_results(results_path: str, requests_path: str) -> list[EvalResu
172
  for file in files:
173
  model_result_filepaths.append(os.path.join(root, file))
174
 
 
 
175
  eval_results = {}
176
  for model_result_filepath in model_result_filepaths:
177
  # Creation of result
@@ -185,6 +189,8 @@ def get_raw_eval_results(results_path: str, requests_path: str) -> list[EvalResu
185
  else:
186
  eval_results[eval_name] = eval_result
187
 
 
 
188
  results = []
189
  for v in eval_results.values():
190
  try:
 
158
  """From the path of the results folder root, extract all needed info for results"""
159
  model_result_filepaths = []
160
 
161
+ print("Getting raw eval results from:")
162
+ print(os.walk(results_path))
163
  for root, _, files in os.walk(results_path):
164
  # We should only have json files in model results
165
  if len(files) == 0 or any([not f.endswith(".json") for f in files]):
 
174
  for file in files:
175
  model_result_filepaths.append(os.path.join(root, file))
176
 
177
+ print("model results filepaths are")
178
+ print(model_result_filepaths)
179
  eval_results = {}
180
  for model_result_filepath in model_result_filepaths:
181
  # Creation of result
 
189
  else:
190
  eval_results[eval_name] = eval_result
191
 
192
+ print("eval results are")
193
+ print(eval_results)
194
  results = []
195
  for v in eval_results.values():
196
  try:
src/populate.py CHANGED
@@ -10,6 +10,8 @@ from src.leaderboard.read_evals import get_raw_eval_results
10
 
11
  def get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchmark_cols: list) -> pd.DataFrame:
12
  raw_data = get_raw_eval_results(results_path, requests_path)
 
 
13
  all_data_json = [v.to_dict() for v in raw_data]
14
 
15
  df = pd.DataFrame.from_records(all_data_json)
@@ -23,6 +25,8 @@ def get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchm
23
 
24
  def get_evaluation_queue_df(save_path: str, cols: list) -> list[pd.DataFrame]:
25
  entries = [entry for entry in os.listdir(save_path) if not entry.startswith(".")]
 
 
26
  all_evals = []
27
 
28
  for entry in entries:
 
10
 
11
  def get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchmark_cols: list) -> pd.DataFrame:
12
  raw_data = get_raw_eval_results(results_path, requests_path)
13
+ print("To get the leaderboard df, the raw_data is:")
14
+ print(raw_data)
15
  all_data_json = [v.to_dict() for v in raw_data]
16
 
17
  df = pd.DataFrame.from_records(all_data_json)
 
25
 
26
  def get_evaluation_queue_df(save_path: str, cols: list) -> list[pd.DataFrame]:
27
  entries = [entry for entry in os.listdir(save_path) if not entry.startswith(".")]
28
+ print("To get the evaluation queue df, the entries are:")
29
+ print(entries)
30
  all_evals = []
31
 
32
  for entry in entries: