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>
56 lines
1.3 KiB
TOML
56 lines
1.3 KiB
TOML
[project]
|
|
name = "pipu-rec"
|
|
version = "0.1.0"
|
|
description = "Pipu Music: recommendations and audio analysis"
|
|
requires-python = ">=3.12,<3.13"
|
|
dependencies = [
|
|
"fastapi>=0.115,<1",
|
|
"uvicorn[standard]>=0.34,<1",
|
|
"pydantic-settings>=2.9,<3",
|
|
"psycopg[binary]>=3.2,<4",
|
|
"redis>=6.2,<7",
|
|
"numpy>=2.2,<3",
|
|
"pyyaml>=6.0,<7",
|
|
"lightgbm>=4.5,<5",
|
|
]
|
|
|
|
[project.scripts]
|
|
pipu-rec = "pipu_rec.cli:main"
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"pytest>=8.4,<9",
|
|
"httpx>=0.28,<1",
|
|
"ruff>=0.12,<1",
|
|
"mypy>=1.16,<2",
|
|
"types-pyyaml>=6.0",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["hatchling>=1.27"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["pipu_rec"]
|
|
|
|
[tool.ruff]
|
|
line-length = 110
|
|
target-version = "py312"
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "W", "I", "B", "UP", "SIM", "RUF"]
|
|
# Комментарии и докстринги на русском: «с», «у», «−» — не опечатки в латинице.
|
|
ignore = ["RUF001", "RUF002", "RUF003"]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
# SQL-вставки тестовых данных читаются лучше одной строкой.
|
|
"tests/test_db_integration.py" = ["E501"]
|
|
|
|
[tool.mypy]
|
|
strict = true
|
|
python_version = "3.12"
|
|
plugins = ["pydantic.mypy"]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|