lixuejing
commited on
Commit
·
7148ead
1
Parent(s):
59a1e42
add log
Browse files- src/tools/plots.py +2 -1
src/tools/plots.py
CHANGED
@@ -19,9 +19,9 @@ def create_scores_df(raw_data: list[EvalResult]) -> pd.DataFrame:
|
|
19 |
"""
|
20 |
# Step 1: Ensure 'date' is in datetime format and sort the DataFrame by it
|
21 |
results_df = pd.DataFrame(raw_data)
|
22 |
-
print("results_df", results_df)
|
23 |
results_df["date"] = pd.to_datetime(results_df["date"], format="mixed", utc=True)
|
24 |
results_df.sort_values(by="date", inplace=True)
|
|
|
25 |
|
26 |
# Step 2: Initialize the scores dictionary
|
27 |
scores = {k: [] for k in BENCHMARK_COLS + [AutoEvalColumn.average.name]}
|
@@ -46,6 +46,7 @@ def create_scores_df(raw_data: list[EvalResult]) -> pd.DataFrame:
|
|
46 |
else:
|
47 |
current_score = 0
|
48 |
|
|
|
49 |
if current_score > current_max:
|
50 |
if current_date == last_date and len(scores[column]) > 0:
|
51 |
scores[column][-1] = {"model": current_model, "date": current_date, "score": current_score}
|
|
|
19 |
"""
|
20 |
# Step 1: Ensure 'date' is in datetime format and sort the DataFrame by it
|
21 |
results_df = pd.DataFrame(raw_data)
|
|
|
22 |
results_df["date"] = pd.to_datetime(results_df["date"], format="mixed", utc=True)
|
23 |
results_df.sort_values(by="date", inplace=True)
|
24 |
+
print("results_df", results_df)
|
25 |
|
26 |
# Step 2: Initialize the scores dictionary
|
27 |
scores = {k: [] for k in BENCHMARK_COLS + [AutoEvalColumn.average.name]}
|
|
|
46 |
else:
|
47 |
current_score = 0
|
48 |
|
49 |
+
print(current_score,current_max, task.benchmark)
|
50 |
if current_score > current_max:
|
51 |
if current_date == last_date and len(scores[column]) > 0:
|
52 |
scores[column][-1] = {"model": current_model, "date": current_date, "score": current_score}
|