feat(recommender): LightGBM lambdarank ranker with impression features (M6)
The wave logs each served candidate's feature vector to rec_impression_features. Nightly training joins them with impression outcomes, validates on the last week and activates the model only when it beats the v1 order and the active model. The service loads the active ranker and uses its order in place of the v1 score. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fb07f962eb
commit
58bd14ef38
12 files changed
+551
-14
No files matched your search
@@ -30,7 +30,7 @@ def _serve(settings: Settings) -> None:
|
||||
wave = WaveService(settings.database_url, settings.redis_url, load_contexts(settings.contexts_path))
|
||||
if settings.train_hour >= 0:
|
||||
# После активации новой модели каталог перечитывается сразу — горячая подмена векторов.
|
||||
NightlyTrainer(settings.database_url, settings.train_hour, on_done=wave.index.refresh).start()
|
||||
NightlyTrainer(settings.database_url, settings.train_hour, on_done=wave.reload).start()
|
||||
app = create_app(settings, {"postgres": check_postgres, "redis": check_redis}, wave)
|
||||
uvicorn.run(app, host=settings.http_host, port=settings.http_port, log_level=settings.log_level)
|
||||
|
||||
|
||||
Reference in new issue
Block a user