Skip to content

Commit a049d51

Browse files
committed
fixed cupy dependancy
1 parent cb510f0 commit a049d51

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

poetry.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,20 @@ pytorch-lightning = [
9696
ipywidgets = {version = ">=7.7,<8.2", optional = true}
9797
plotly = {version="^5.22.0", optional = true}
9898
nbformat = {version = ">=4.2.0", optional = true}
99+
100+
# cupy-cuda12x is incompatible with MacOS.
101+
# It's possible to install pure `cupy` and it will be fully compatible
102+
# but it will work only with CPU and will be slower than `numpy`.
103+
# That's why we don't install cupy at all on MacOS and handle it during the import.
99104
cupy-cuda12x = [
100-
{version = "^13.3.0", python = "<3.13", optional = true},
101-
{version = "^13.4.0", python = ">=3.13", optional = true},
105+
{version = "^13.3.0", python = "<3.13", markers = "sys_platform != 'darwin'", optional = true},
106+
{version = "^13.4.0", python = ">=3.13", markers = "sys_platform != 'darwin'", optional = true},
102107
]
103108
# This is a dependency of cupy-cuda12x
104109
# poetry can't resolve appropriate version of fastrlock for Python 3.13
105110
# and cupy-cuda12x, so we add the version restriction here manually to avoid
106111
# installing older version of fastrlock which is incompatible with Python 3.13
107-
fastrlock = {version = "^0.8.3", optional = true}
112+
fastrlock = {version = "^0.8.3", markers = "sys_platform != 'darwin'", optional = true}
108113

109114
[tool.poetry.extras]
110115
lightfm = ["rectools-lightfm"]
@@ -117,7 +122,7 @@ all = [
117122
"nmslib", "nmslib-metabrainz",
118123
"torch", "pytorch-lightning",
119124
"ipywidgets", "plotly", "nbformat",
120-
"cupy-cuda12x",
125+
"cupy", "cupy-cuda12x",
121126
]
122127

123128

0 commit comments

Comments
 (0)