From 1ca6d1a94aa54ac655422a3393f8c3f6962fa8ce Mon Sep 17 00:00:00 2001 From: extreme4all <40169115+extreme4all@users.noreply.github.com> Date: Sat, 7 Sep 2024 15:51:56 +0200 Subject: [PATCH] adding extra logging --- api/app.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/app.py b/api/app.py index 8da1a70..74a520c 100644 --- a/api/app.py +++ b/api/app.py @@ -154,6 +154,8 @@ async def train(secret: str): hiscore_data = await req.get_hiscore_data(label_id=label["id"]) hiscores.extend(hiscore_data) + logger.info(f"{label=}, {len(players)=}, {len(hiscores)=}") + # parse hiscoreData hiscoredata = data.hiscoreData(hiscores) del hiscores @@ -186,8 +188,8 @@ async def train(secret: str): # merge features with target features_labeled = features.merge(player_data, left_index=True, right_index=True) - print(pd.DataFrame(features_labeled.iloc[:, -1].value_counts())) + # Count occurrences of each category in the target column target_counts = features_labeled["target"].value_counts()