xeon27
commited on
Commit
·
7c6bd6c
1
Parent(s):
3a37ec7
Debug
Browse files- src/populate.py +10 -1
src/populate.py
CHANGED
|
@@ -8,6 +8,15 @@ from src.display.utils import AutoEvalColumn, EvalQueueColumn
|
|
| 8 |
from src.leaderboard.read_evals import get_raw_eval_results
|
| 9 |
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
def get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchmark_cols: list) -> pd.DataFrame:
|
| 12 |
"""Creates a dataframe from all the individual experiment results"""
|
| 13 |
raw_data = get_raw_eval_results(results_path, requests_path)
|
|
@@ -22,7 +31,7 @@ def get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchm
|
|
| 22 |
df = df[has_no_nan_values(df, benchmark_cols)]
|
| 23 |
|
| 24 |
# TMP: Debugging
|
| 25 |
-
print(df.
|
| 26 |
|
| 27 |
return df
|
| 28 |
|
|
|
|
| 8 |
from src.leaderboard.read_evals import get_raw_eval_results
|
| 9 |
|
| 10 |
|
| 11 |
+
def get_inspect_log_url(model_name: str, benchmark_type: str, benchmark_name: str, log_dir: str) -> str:
|
| 12 |
+
"""Returns the URL to the log file for a given model and benchmark"""
|
| 13 |
+
model_name = model_name.replace("/", "_")
|
| 14 |
+
log_name = f"{model_name}_{benchmark_type}.log"
|
| 15 |
+
log_path = os.path.join(log_dir, log_name)
|
| 16 |
+
if os.path.exists(log_path):
|
| 17 |
+
return log_path
|
| 18 |
+
return ""
|
| 19 |
+
|
| 20 |
def get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchmark_cols: list) -> pd.DataFrame:
|
| 21 |
"""Creates a dataframe from all the individual experiment results"""
|
| 22 |
raw_data = get_raw_eval_results(results_path, requests_path)
|
|
|
|
| 31 |
df = df[has_no_nan_values(df, benchmark_cols)]
|
| 32 |
|
| 33 |
# TMP: Debugging
|
| 34 |
+
print(df[AutoEvalColumn.model.name].head())
|
| 35 |
|
| 36 |
return df
|
| 37 |
|