ci / recommender / recommender (push) Successful in 37s
- Implicit scores from play events and reactions per the signals table (90-day half-life, weaker skips outside the wave, dislikes override). - numpy ALS for implicit feedback; time-split evaluation on the last 7 days (NDCG@10, Recall@50) against a popularity baseline; a new model is activated only if NDCG@10 does not regress by more than 2%. - Vectors are written to track_embeddings.cf and user_profiles_rec.taste_cf, versions to model_versions; NightlyTrainer runs at TRAIN_HOUR and on first start, `pipu-rec train` runs it manually. - Wave: cf and item_cf candidate sources and a 0.10 cf term in the v1 score; impressions are tagged heuristic-v1+cf. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
22 lines
1.0 KiB
Python
22 lines
1.0 KiB
Python
"""Конфигурация сервиса из переменных окружения."""
|
|
|
|
from pydantic import Field
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(env_prefix="", extra="ignore")
|
|
|
|
http_host: str = "0.0.0.0"
|
|
http_port: int = 8000
|
|
database_url: str = Field(default="postgresql://pipu:pipu@postgres:5432/pipu")
|
|
redis_url: str = Field(default="redis://redis:6379/0")
|
|
internal_token: str = Field(default="", description="Общий секрет для вызовов из api")
|
|
log_level: str = "info"
|
|
library_root: str = "/library"
|
|
library_host_root: str = "/library-host"
|
|
ffmpeg_path: str = "ffmpeg"
|
|
contexts_path: str = Field(default="", description="contexts.yaml; пусто — встроенный")
|
|
train_hour: int = Field(default=3, ge=-1, le=23, description="час ночного обучения; -1 — выключено")
|
|
version: str = Field(default="0.0.0-dev", alias="PIPU_VERSION")
|