From 30600a5b9c93605715b6869e12b0e7ead1e65a60 Mon Sep 17 00:00:00 2001 From: Azalea <22280294+hykilpikonna@users.noreply.github.com> Date: Sun, 9 Mar 2025 10:57:49 -0400 Subject: [PATCH] [+] Verse: Model inference progress bar --- tools/recommend.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/recommend.py b/tools/recommend.py index 7564894f..ef487ef2 100644 --- a/tools/recommend.py +++ b/tools/recommend.py @@ -10,6 +10,7 @@ import requests import scipy.sparse as sp import implicit from hypy_utils.logging_utils import setup_logger +from tqdm import tqdm BASE_URL = "https://aquadx.net/aqua/api/v2/game" BOT_SECRET = "hunter2" @@ -40,7 +41,7 @@ def main(game: str): # Generate recommendations for each user log.info("Generating recommendations...") recommendations = {} - for user_id in range(user_item_matrix.shape[0]): # Loop over all users + for user_id in tqdm(list(range(user_item_matrix.shape[0]))): # Loop over all users rec, prob = model.recommend(user_id, user_item_matrix[user_id], N=20) recommendations[user_id] = [int(item) for item in rec]