Skip to content

Commit 01509bd

Browse files
committed
Fixed the problem with pyg-lib by downgrading torch
1 parent 0b438a5 commit 01509bd

3 files changed

Lines changed: 823 additions & 2374 deletions

File tree

pyproject.toml

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
[project]
22
name = "cbs-python"
33
version = "0.1.0"
4-
description = "Add your description here"
5-
readme = "README.md"
6-
requires-python = ">=3.12"
4+
requires-python = ">=3.12,<3.13"
75
dependencies = [
86
"accelerate==1.14.0",
97
"captum==0.9.0",
@@ -23,7 +21,7 @@ dependencies = [
2321
"json5==0.15.0",
2422
"jupysql==0.11.1",
2523
"jupyter==1.1.1",
26-
"jupyterlab==4.6.0",
24+
"jupyterlab==4.6.1",
2725
"jupyterlab-optuna==0.3.0",
2826
"kaleido==1.3.0",
2927
"lifelines==0.30.3",
@@ -42,18 +40,18 @@ dependencies = [
4240
"polars==1.42.0",
4341
"pre-commit==4.6.0",
4442
"pyarrow==24.0.0",
45-
"pyg-lib==0.7.0 ; platform_machine != 'arm64' or sys_platform != 'darwin'",
43+
"pyg-lib==0.7.0",
4644
"pyreadstat==1.3.5",
4745
"pytest==9.1.1",
4846
"pyyaml==6.0.3",
4947
"ruff==0.15.20",
5048
"scikit-learn==1.9.0",
5149
"scipy==1.18.0",
5250
"seaborn==0.13.2",
53-
"shap==0.49.1",
51+
"shap==0.52.0",
5452
"statsmodels==0.14.6",
5553
"tensorboard==2.20.0",
56-
"torch==2.12.1",
54+
"torch==2.9.0",
5755
"torch-cluster==1.6.3",
5856
"torch-geometric==2.8.0",
5957
"torch-scatter==2.1.2",
@@ -65,6 +63,31 @@ dependencies = [
6563
"wandb==0.28.0",
6664
]
6765

66+
6867
[tool.uv.pip]
6968
find-links = ["https://data.pyg.org/whl/torch-2.9.0+cpu.html"]
7069
emit-find-links = true
70+
71+
[tool.uv]
72+
environments = [
73+
"sys_platform == 'win32'",
74+
"sys_platform == 'linux'",
75+
"sys_platform == 'darwin' and platform_machine == 'arm64'",
76+
]
77+
# Force uv to pick wheels that exist for these (fixes the torch-cluster win issue)
78+
required-environments = [
79+
"sys_platform == 'win32' and platform_machine == 'AMD64'",
80+
]
81+
82+
[[tool.uv.index]]
83+
name = "pyg-cpu"
84+
url = "https://data.pyg.org/whl/torch-2.9.0+cpu.html" # matches torch 2.9
85+
format = "flat"
86+
explicit = true
87+
88+
[tool.uv.sources]
89+
pyg-lib = { index = "pyg-cpu" }
90+
torch-scatter = { index = "pyg-cpu" }
91+
torch-sparse = { index = "pyg-cpu" }
92+
torch-cluster = { index = "pyg-cpu" }
93+
torch-spline-conv = { index = "pyg-cpu" }

requirements.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ statsmodels # statistical models
5858
#pymc3 (pymc3 is at the current version not playing nicely with the other packages in pip)
5959
lifelines # survival analysis
6060
# Deep learning
61-
torch # deep learning framework
61+
torch ==2.9.0 # deep learning framework
6262
#tensorflow (nit does not play nicely with pip)
6363
torch-geometric # graph neural networks
6464
# PyG CPU wheels for torch 2.9 (win_amd64, linux, macOS universal2; cp39-cp313)
6565
# see [tool.uv.pip] find-links in pyproject.toml for the wheel index URL
66-
pyg-lib; sys_platform != "darwin" or platform_machine != "arm64" # no macOS arm64 wheel for this torch build on data.pyg.org # PyG acceleration library
66+
pyg-lib # no macOS arm64 wheel for this torch build on data.pyg.org # PyG acceleration library
6767
torch-sparse # sparse tensor ops for PyG
6868
torch-scatter # scatter ops for PyG
6969
torch-cluster # clustering ops for PyG

0 commit comments

Comments
 (0)