cyberosa
commited on
Commit
·
b1f5e34
1
Parent(s):
1a99ad4
correcting the release date of the new ranking
Browse files- scripts/update_tools_accuracy.py +13 -5
- tools_accuracy.csv +12 -12
scripts/update_tools_accuracy.py
CHANGED
|
@@ -32,8 +32,16 @@ def update_tools_accuracy_same_model(
|
|
| 32 |
).astype(int)
|
| 33 |
tools_non_error.columns = tools_non_error.columns.astype(str)
|
| 34 |
|
| 35 |
-
wins
|
| 36 |
-
wins
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
wins.reset_index(inplace=True)
|
| 38 |
wins["total_requests"] = wins[0] + wins[1]
|
| 39 |
wins.columns = wins.columns.astype(str)
|
|
@@ -131,13 +139,13 @@ def update_tools_accuracy(
|
|
| 131 |
) -> pd.DataFrame:
|
| 132 |
"""To compute/update the latest accuracy information for the different mech tools but splitting by date 23rd of May 2025"""
|
| 133 |
|
| 134 |
-
# to compute the accuracy information up to the
|
| 135 |
tools_df["request_time"] = pd.to_datetime(tools_df["request_time"])
|
| 136 |
tools_df["request_date"] = tools_df["request_time"].dt.date
|
| 137 |
tools_df["request_date"] = pd.to_datetime(tools_df["request_date"])
|
| 138 |
tools_df["request_date"] = tools_df["request_date"].dt.strftime("%Y-%m-%d")
|
| 139 |
-
# split the data into two parts: before and after
|
| 140 |
-
split_date = pd.to_datetime("2025-
|
| 141 |
before_split = tools_df[tools_df["request_time"] < split_date]
|
| 142 |
after_split = tools_df[tools_df["request_time"] >= split_date]
|
| 143 |
print(f"Number of requests before {split_date}: {len(before_split)}")
|
|
|
|
| 32 |
).astype(int)
|
| 33 |
tools_non_error.columns = tools_non_error.columns.astype(str)
|
| 34 |
|
| 35 |
+
# Modify the wins calculation to handle missing win categories
|
| 36 |
+
wins = tools_non_error.groupby(["tool", "win"]).size().unstack(fill_value=0)
|
| 37 |
+
|
| 38 |
+
# Ensure both 0 and 1 columns exist
|
| 39 |
+
if 0 not in wins.columns:
|
| 40 |
+
wins[0] = 0
|
| 41 |
+
if 1 not in wins.columns:
|
| 42 |
+
wins[1] = 0
|
| 43 |
+
|
| 44 |
+
wins["tool_accuracy"] = (wins[1] / (wins[0] + wins[1])).fillna(0) * 100
|
| 45 |
wins.reset_index(inplace=True)
|
| 46 |
wins["total_requests"] = wins[0] + wins[1]
|
| 47 |
wins.columns = wins.columns.astype(str)
|
|
|
|
| 139 |
) -> pd.DataFrame:
|
| 140 |
"""To compute/update the latest accuracy information for the different mech tools but splitting by date 23rd of May 2025"""
|
| 141 |
|
| 142 |
+
# to compute the accuracy information up to the 3rd of June
|
| 143 |
tools_df["request_time"] = pd.to_datetime(tools_df["request_time"])
|
| 144 |
tools_df["request_date"] = tools_df["request_time"].dt.date
|
| 145 |
tools_df["request_date"] = pd.to_datetime(tools_df["request_date"])
|
| 146 |
tools_df["request_date"] = tools_df["request_date"].dt.strftime("%Y-%m-%d")
|
| 147 |
+
# split the data into two parts: before and after the 3rd of June
|
| 148 |
+
split_date = pd.to_datetime("2025-06-03").tz_localize("UTC")
|
| 149 |
before_split = tools_df[tools_df["request_time"] < split_date]
|
| 150 |
after_split = tools_df[tools_df["request_time"] >= split_date]
|
| 151 |
print(f"Number of requests before {split_date}: {len(before_split)}")
|
tools_accuracy.csv
CHANGED
|
@@ -1,13 +1,13 @@
|
|
| 1 |
tool,tool_accuracy,total_requests,min,max
|
| 2 |
-
claude-prediction-offline,
|
| 3 |
-
claude-prediction-online,
|
| 4 |
-
prediction-offline,
|
| 5 |
-
prediction-offline-sme,
|
| 6 |
-
prediction-online,
|
| 7 |
-
prediction-online-sme,
|
| 8 |
-
prediction-request-rag,
|
| 9 |
-
prediction-request-rag-claude,
|
| 10 |
-
prediction-request-reasoning,
|
| 11 |
-
prediction-request-reasoning-claude,
|
| 12 |
-
prediction-url-cot-claude,
|
| 13 |
-
superforcaster,
|
|
|
|
| 1 |
tool,tool_accuracy,total_requests,min,max
|
| 2 |
+
claude-prediction-offline,58.16137739988474,98911,2025-04-02 05:16:45,2025-05-28 03:56:15
|
| 3 |
+
claude-prediction-online,60.45149131432317,48816,2025-04-02 00:01:00,2025-05-21 18:47:35
|
| 4 |
+
prediction-offline,57.25305077475218,515197,2025-04-02 00:00:05,2025-06-02 23:38:25
|
| 5 |
+
prediction-offline-sme,56.91160809371672,4695,2025-04-02 00:57:25,2025-06-01 07:02:00
|
| 6 |
+
prediction-online,48.791164658634536,24900,2025-04-02 07:32:50,2025-06-02 23:10:05
|
| 7 |
+
prediction-online-sme,49.207660533233195,13315,2025-04-02 07:33:25,2025-06-02 22:36:55
|
| 8 |
+
prediction-request-rag,44.9438202247191,356,2025-04-02 14:01:55,2025-05-20 15:37:10
|
| 9 |
+
prediction-request-rag-claude,49.13151364764268,403,2025-04-02 12:05:10,2025-05-27 18:42:00
|
| 10 |
+
prediction-request-reasoning,52.46685168054271,220524,2025-04-02 07:03:25,2025-06-02 23:19:40
|
| 11 |
+
prediction-request-reasoning-claude,62.76923076923077,325,2025-04-02 12:25:50,2025-05-28 09:25:40
|
| 12 |
+
prediction-url-cot-claude,57.18562874251497,1336,2025-04-02 05:46:40,2025-05-20 15:21:20
|
| 13 |
+
superforcaster,53.940940576011656,27430,2025-04-02 00:02:10,2025-06-02 21:40:15
|