TTimur commited on
Commit
9b1e367
·
1 Parent(s): b0acfda

code update

Browse files
Files changed (2) hide show
  1. src/leaderboard/read_evals.py +8 -8
  2. src/populate.py +4 -4
src/leaderboard/read_evals.py CHANGED
@@ -203,14 +203,14 @@ def get_raw_eval_results(results_path: str, requests_path: str) -> list[EvalResu
203
  """From the path of the results folder root, extract all needed info for results"""
204
  model_result_filepaths = []
205
 
206
- print(f"DEBUG: Results path: {results_path}")
207
- try:
208
- files = os.listdir(results_path)
209
- for f in files:
210
- print(f)
211
- except FileNotFoundError:
212
- print(f"Error: Directory not found at {results_path}")
213
- return [] # Exit early if path doesn't exist
214
 
215
 
216
 
 
203
  """From the path of the results folder root, extract all needed info for results"""
204
  model_result_filepaths = []
205
 
206
+ # print(f"DEBUG: Results path: {results_path}")
207
+ # try:
208
+ # files = os.listdir(results_path)
209
+ # for f in files:
210
+ # print(f)
211
+ # except FileNotFoundError:
212
+ # print(f"Error: Directory not found at {results_path}")
213
+ # return [] # Exit early if path doesn't exist
214
 
215
 
216
 
src/populate.py CHANGED
@@ -10,13 +10,13 @@ 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
- print(f"DEBUG: Raw data: {raw_data}")
14
  all_data_json = [v.to_dict() for v in raw_data]
15
- print(f"DEBUG: All data JSON: {all_data_json}")
16
 
17
  df = pd.DataFrame.from_records(all_data_json)
18
- print(f"DEBUG: DataFrame columns: {list(df.columns)}")
19
- print(f"DEBUG: Looking for column: {AutoEvalColumn.average.name}")
20
  df = df.sort_values(by=[AutoEvalColumn.average.name], ascending=False)
21
  df = df[cols].round(decimals=2)
22
 
 
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(f"DEBUG: Raw data: {raw_data}")
14
  all_data_json = [v.to_dict() for v in raw_data]
15
+ # print(f"DEBUG: All data JSON: {all_data_json}")
16
 
17
  df = pd.DataFrame.from_records(all_data_json)
18
+ # print(f"DEBUG: DataFrame columns: {list(df.columns)}")
19
+ # print(f"DEBUG: Looking for column: {AutoEvalColumn.average.name}")
20
  df = df.sort_values(by=[AutoEvalColumn.average.name], ascending=False)
21
  df = df[cols].round(decimals=2)
22