From 51684bf3b9d26a804e336f787097f5fb2e6d5477 Mon Sep 17 00:00:00 2001 From: likerhythm Date: Fri, 1 Aug 2025 15:16:12 +0900 Subject: [PATCH 1/5] =?UTF-8?q?fix[#27]:=20metaInfo=20=EC=9D=B4=EB=A6=84?= =?UTF-8?q?=EC=9D=84=20db=20=EA=B8=B0=EC=A4=80=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EC=A0=80=EC=9E=A5=ED=95=98=EB=8F=84=EB=A1=9D=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/daily_weight_resizer.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/services/daily_weight_resizer.py b/app/services/daily_weight_resizer.py index 81aeabb..56d5d85 100644 --- a/app/services/daily_weight_resizer.py +++ b/app/services/daily_weight_resizer.py @@ -65,10 +65,8 @@ async def resize_weight( countries = meta.get('country', {}) for _, genre_name in genres.items(): - translated = db_w2v_mapper.translate_genre(genre_name) - if translated: - genre_dict[translated] += resized_weight for _, actor_name in actors.items(): + genre_dict[genre_name] += resized_weight actor_dict[actor_name] += resized_weight for _, director_name in directors.items(): director_dict[director_name] += resized_weight From e6b5ad329ebdcfbad0f1ae502d8f677d39441079 Mon Sep 17 00:00:00 2001 From: likerhythm Date: Fri, 1 Aug 2025 15:16:30 +0900 Subject: [PATCH 2/5] =?UTF-8?q?fix[#27]:=20dict=EA=B0=80=20=EC=95=84?= =?UTF-8?q?=EB=8B=8C=20list=EB=A1=9C=20=EB=8B=A4=EB=A3=A8=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/daily_weight_resizer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/services/daily_weight_resizer.py b/app/services/daily_weight_resizer.py index 56d5d85..bbda6ca 100644 --- a/app/services/daily_weight_resizer.py +++ b/app/services/daily_weight_resizer.py @@ -64,13 +64,13 @@ async def resize_weight( directors = meta.get('director', {}) countries = meta.get('country', {}) - for _, genre_name in genres.items(): - for _, actor_name in actors.items(): + for _, genre_name in genres: genre_dict[genre_name] += resized_weight + for _, actor_name in actors: actor_dict[actor_name] += resized_weight - for _, director_name in directors.items(): + for _, director_name in directors: director_dict[director_name] += resized_weight - for _, country_name in countries.items(): + for _, country_name in countries: country_dict[country_name] += resized_weight From ec241ed6756d3feb35540ca6e729741607cfca9d Mon Sep 17 00:00:00 2001 From: likerhythm Date: Fri, 1 Aug 2025 15:17:26 +0900 Subject: [PATCH 3/5] =?UTF-8?q?fix[#27]:=20ms=20=EB=8B=A8=EC=9C=84?= =?UTF-8?q?=EA=B0=80=20=EC=95=84=EB=8B=8C=20=ED=95=98=EB=A3=A8=20=EB=8B=A8?= =?UTF-8?q?=EC=9C=84=EB=A1=9C=20resize=ED=95=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/util/weight_aging.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/util/weight_aging.py b/app/util/weight_aging.py index c9997ee..612c6eb 100644 --- a/app/util/weight_aging.py +++ b/app/util/weight_aging.py @@ -4,7 +4,7 @@ def exponential_decay_weight(original_weight: float, event_timestamp_ms: int, lambda_: float = 0.1) -> float: current_timestamp_ms = int(time.time() * 1000) delta_ms = current_timestamp_ms - event_timestamp_ms - delta_days = delta_ms / (1000 * 60 * 60 * 24) + delta_days = int(delta_ms / (1000 * 60 * 60 * 24)) decayed_weight = original_weight * math.exp(-lambda_ * delta_days) return round(decayed_weight, 2) From fec52adc8c99d82dd38364a6e9e22d9c2a7bc1b5 Mon Sep 17 00:00:00 2001 From: likerhythm Date: Fri, 1 Aug 2025 15:17:46 +0900 Subject: [PATCH 4/5] =?UTF-8?q?fix[#27]:=20=EC=9E=AC=EA=B3=84=EC=82=B0?= =?UTF-8?q?=EB=90=9C=20=EA=B0=80=EC=A4=91=EC=B9=98=EB=A5=BC=20=EC=86=8C?= =?UTF-8?q?=EC=88=98=EC=A0=90=20=EA=B8=B0=EC=A4=80=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EC=9E=90=EB=A5=B4=EC=A7=80=20=EC=95=8A=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/util/weight_aging.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/util/weight_aging.py b/app/util/weight_aging.py index 612c6eb..592de8c 100644 --- a/app/util/weight_aging.py +++ b/app/util/weight_aging.py @@ -7,4 +7,4 @@ def exponential_decay_weight(original_weight: float, event_timestamp_ms: int, la delta_days = int(delta_ms / (1000 * 60 * 60 * 24)) decayed_weight = original_weight * math.exp(-lambda_ * delta_days) - return round(decayed_weight, 2) + return decayed_weight From fd93b9af6a060b0a53bf45893ea62528bfbed1a2 Mon Sep 17 00:00:00 2001 From: likerhythm Date: Fri, 1 Aug 2025 15:24:12 +0900 Subject: [PATCH 5/5] =?UTF-8?q?chore[#27]:=20=EB=B6=88=ED=95=84=EC=9A=94?= =?UTF-8?q?=20import=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/daily_weight_resizer.py | 1 - 1 file changed, 1 deletion(-) diff --git a/app/services/daily_weight_resizer.py b/app/services/daily_weight_resizer.py index bbda6ca..c7bf946 100644 --- a/app/services/daily_weight_resizer.py +++ b/app/services/daily_weight_resizer.py @@ -5,7 +5,6 @@ import numpy as np from collections import defaultdict import app -from app.models import db_w2v_mapper from app.repositories.managed_action_log_repository import ManagedActionLogRepository from app.services import weight_strategy from app.enum.action_type import ActionType