Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update src/leaderboard/read_evals.py
Browse files
src/leaderboard/read_evals.py
CHANGED
|
@@ -198,7 +198,9 @@ def get_request_file_for_model(requests_path, model_name, precision):
|
|
| 198 |
def get_raw_eval_results(results_path: str, requests_path: str) -> list[EvalResult]:
|
| 199 |
"""From the path of the results folder root, extract all needed info for results"""
|
| 200 |
model_result_filepaths = []
|
| 201 |
-
|
|
|
|
|
|
|
| 202 |
for root, _, files in os.walk(results_path):
|
| 203 |
# We should only have json files in model results
|
| 204 |
if len(files) == 0 or any([not f.endswith(".json") for f in files]):
|
|
@@ -215,9 +217,12 @@ def get_raw_eval_results(results_path: str, requests_path: str) -> list[EvalResu
|
|
| 215 |
|
| 216 |
eval_results = {}
|
| 217 |
for model_result_filepath in model_result_filepaths:
|
|
|
|
| 218 |
# Creation of result
|
|
|
|
| 219 |
eval_result = EvalResult.init_from_json_file(model_result_filepath)
|
| 220 |
eval_result.update_with_request_file(requests_path)
|
|
|
|
| 221 |
|
| 222 |
# Store results of same eval together
|
| 223 |
eval_name = eval_result.eval_name
|
|
|
|
| 198 |
def get_raw_eval_results(results_path: str, requests_path: str) -> list[EvalResult]:
|
| 199 |
"""From the path of the results folder root, extract all needed info for results"""
|
| 200 |
model_result_filepaths = []
|
| 201 |
+
print(f"Checking results in: {results_path}")
|
| 202 |
+
print(f"Model result filepaths found: {model_result_filepaths}")
|
| 203 |
+
|
| 204 |
for root, _, files in os.walk(results_path):
|
| 205 |
# We should only have json files in model results
|
| 206 |
if len(files) == 0 or any([not f.endswith(".json") for f in files]):
|
|
|
|
| 217 |
|
| 218 |
eval_results = {}
|
| 219 |
for model_result_filepath in model_result_filepaths:
|
| 220 |
+
print(f"Processing result file: {model_result_filepath}")
|
| 221 |
# Creation of result
|
| 222 |
+
print(f"Eval result for {model_result_filepath}: {eval_result}")
|
| 223 |
eval_result = EvalResult.init_from_json_file(model_result_filepath)
|
| 224 |
eval_result.update_with_request_file(requests_path)
|
| 225 |
+
print(f"Updated eval result with request file: {eval_result}")
|
| 226 |
|
| 227 |
# Store results of same eval together
|
| 228 |
eval_name = eval_result.eval_name
|