Skip to content

Commit

Permalink
Use nmslib-metabrainz for Python 3.11 and upper
Browse files Browse the repository at this point in the history
  • Loading branch information
chezou committed Aug 15, 2024
1 parent ae77f27 commit 7ac3998
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ install: .venv .reports
poetry run pytest ${TESTS} --cov=${SOURCES} --cov-report=xml

.doctest:
poetry run pytest --doctest-modules ${SOURCES} --ignore=rectools/tools/ann.py --ignore=rectools/models/lightfm.py
poetry run pytest --doctest-modules ${SOURCES} --ignore=rectools/models/lightfm.py

coverage: .venv .reports
poetry run coverage run --source ${SOURCES} --module pytest
Expand Down
37 changes: 34 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ authors = [
"Mikhail Khasykov <[email protected]>",
"Mike Sokolov <[email protected]>",
"Andrey Semenov <[email protected]>",
"Maxim Lukin <[email protected]>"
"Maxim Lukin <[email protected]>"
]
maintainers = [
"Emiliy Feldman <[email protected]>",
Expand Down Expand Up @@ -74,6 +74,8 @@ typeguard = "^4.1.0"
rectools-lightfm = {version="1.17.1", python = "<3.12", 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
nmslib-metabrainz = {version = "^2.1.3", python = ">=3.11, <3.13", optional = true}

# The latest torch version available for MacOSX + x86_64 is 2.2.2
torch = [
Expand All @@ -89,12 +91,12 @@ nbformat = {version = ">=4.2.0", optional = true}

[tool.poetry.extras]
lightfm = ["rectools-lightfm"]
nmslib = ["nmslib"]
nmslib = ["nmslib", "nmslib-metabrainz"]
torch = ["torch", "pytorch-lightning"]
visuals = ["ipywidgets", "plotly", "nbformat"]
all = [
"rectools-lightfm",
"nmslib",
"nmslib", "nmslib-metabrainz",
"torch", "pytorch-lightning",
"ipywidgets", "plotly", "nbformat",
]
Expand Down

0 comments on commit 7ac3998

Please sign in to comment.