Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix get_train_with_targets_for_reranker method #244

Open
wants to merge 20 commits into
base: experimental/two_stage
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
43a34d1
fix get_train_with_targets_for_reranker by adding get_candidates_with…
olesyabulgakova Jan 15, 2025
f16c1ef
Update rectools/models/ranking/candidate_ranking.py
olesyabulgakova Jan 17, 2025
884e5b7
fixed get_full_candidates_with_targets with public methods
olesyabulgakova Jan 17, 2025
627a951
add test_candidate_ranking and test_catboost_reranker
olesyabulgakova Jan 28, 2025
47962fc
add docstrings
olesyabulgakova Jan 29, 2025
6903941
Update rectools/models/ranking/candidate_ranking.py
olesyabulgakova Jan 30, 2025
531d642
Update rectools/models/ranking/candidate_ranking.py
olesyabulgakova Jan 30, 2025
d14c4ed
Update rectools/models/ranking/candidate_ranking.py
olesyabulgakova Jan 30, 2025
8b70b08
Update rectools/models/ranking/candidate_ranking.py
olesyabulgakova Jan 30, 2025
f6b1f9e
Update rectools/models/ranking/candidate_ranking.py
olesyabulgakova Jan 30, 2025
5700343
Update rectools/models/ranking/catboost_reranker.py
olesyabulgakova Jan 30, 2025
423c6a9
Update rectools/models/ranking/candidate_ranking.py
olesyabulgakova Jan 30, 2025
b48aadf
Update rectools/models/ranking/candidate_ranking.py
olesyabulgakova Jan 30, 2025
d5f7426
fix test_catboost_reranker.py
olesyabulgakova Jan 30, 2025
8325272
Merge branch 'experimental/two_stage' of https://github.com/olesyabul…
olesyabulgakova Jan 30, 2025
2f713eb
Update tests/models/ranking/test_catboost_reranker.py
olesyabulgakova Jan 30, 2025
2841017
adding decorator for parameterization in test_catboost_reranker.py
olesyabulgakova Jan 30, 2025
6e9b1bd
fix documentation
olesyabulgakova Jan 31, 2025
c90be25
modified pyproject.toml and poetry.lock
olesyabulgakova Feb 18, 2025
cd2fbdc
fix github/workflows/test.yml
olesyabulgakova Feb 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand All @@ -25,7 +25,7 @@ jobs:

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .venv
key: venv-lint-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
Expand All @@ -43,13 +43,13 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
python-version: [ "3.9", "3.10", "3.11", "3.12" ]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -58,7 +58,7 @@ jobs:

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .venv
key: venv-test-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
Expand Down
280 changes: 151 additions & 129 deletions poetry.lock

Large diffs are not rendered by default.

29 changes: 13 additions & 16 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "RecTools"
version = "0.8.0"
version = "0.11.0"
description = "An easy-to-use Python library for building recommendation systems"
license = "Apache-2.0"
authors = [
Expand Down Expand Up @@ -34,7 +34,6 @@ keywords = [
classifiers = [
"Development Status :: 3 - Alpha",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -53,17 +52,13 @@ packages = [


[tool.poetry.dependencies]
python = ">=3.8.1, <3.13"
python = ">=3.9, <3.13"
numpy = [
{version = ">=1.19.5, <2.0.0", python = "3.8"}, # for compatibility with scipy
{version = ">=1.22, <2.0.0", python = ">=3.9, <3.12"},
{version = ">=1.26, <2.0.0", python = ">=3.12"} # numpy <1.26 fails to install on Python 3.12
{version = ">=1.22, <2.0.0", python = "<3.12"},
{version = ">=1.26, <2.0.0", python = "3.12"} # numpy <1.26 fails to install on Python 3.12
]
pandas = ">=1.5.0, <3.0.0"
scipy = [
{version = "^1.9.1, <1.11", python = "3.8"}, # since 1.11 scipy doesn't support python 3.8
{version = "^1.10.1, <1.13", python = ">=3.9"}, # in 1.13 were introduced significant changes breaking our logic
]
scipy = "^1.10.1, <1.13" # in 1.13 were introduced significant changes breaking our logic
tqdm = "^4.27.0"
implicit = "^0.7.1"
attrs = ">=19.1.0,<24.0.0"
Expand All @@ -73,7 +68,7 @@ pydantic-core = "^2.20.1"
typing-extensions = "^4.12.2"

# The latest released version of lightfm is 1.17 and it's not compatible with PEP-517 installers (like latest poetry versions).
rectools-lightfm = {version="1.17.2", python = "<3.12", optional = true}
rectools-lightfm = {version = "^1.17.3", optional = true}

nmslib = {version = "^2.0.4", python = "<3.11", optional = true}
# nmslib officialy doens't support Python 3.11 and 3.12. Use https://github.com/metabrainz/nmslib-metabrainz instead
Expand All @@ -89,6 +84,7 @@ pytorch-lightning = {version = ">=1.6.0, <3.0.0", optional = true}
ipywidgets = {version = ">=7.7,<8.2", optional = true}
plotly = {version="^5.22.0", optional = true}
nbformat = {version = ">=4.2.0", optional = true}
cupy-cuda12x = {version = "^13.3.0", python = "<3.13", optional = true}
catboost = {version = "^1.1.1", optional = true}


Expand All @@ -97,22 +93,23 @@ lightfm = ["rectools-lightfm"]
nmslib = ["nmslib", "nmslib-metabrainz"]
torch = ["torch", "pytorch-lightning"]
visuals = ["ipywidgets", "plotly", "nbformat"]
cupy = ["cupy-cuda12x"]
catboost = ["catboost"]

all = [
"rectools-lightfm",
"nmslib", "nmslib-metabrainz",
"torch", "pytorch-lightning",
"ipywidgets", "plotly", "nbformat",
"catboost"
"cupy-cuda12x",
"catboost",
]


[tool.poetry.group.dev.dependencies]
black = "24.4.2"
isort = "5.13.2"
pylint = "3.1.0"
mypy = "1.10.0"
mypy = "1.13.0"
flake8 = "7.0.0"
bandit = "1.7.8"
pytest = "8.1.1"
Expand All @@ -131,9 +128,9 @@ gitpython = "3.1.43"

[tool.black]
line-length = 120
target-version = ["py38", "py39", "py310", "py311", "py312"]
target-version = ["py39", "py310", "py311", "py312"]


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
build-backend = "poetry.core.masonry.api"
Loading
Loading