Skip to content

Commit bfdf50f

Browse files
committed
flexible versioning for >torch2.0
1 parent e083476 commit bfdf50f

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ authors = [
1313
license = { file = "LICENSE" }
1414
requires-python = ">=3.10,<3.11"
1515
dependencies = [
16-
"torch>=1.13,<2.0",
17-
"pytorch-lightning<2.0",
16+
"torch==1.13.1; python_version < \"3.11\"",
17+
"torch>=2.1; python_version >= \"3.12\"",
18+
"pytorch-lightning==1.9.*; python_version < \"3.11\"",
19+
"pytorch-lightning>=2.1,<3.0; python_version >= \"3.12\"",
1820
"torchvision",
1921
"numpy",
2022
"kornia",

requirements.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@
33
# If PyPI cannot locate torch/torchvision, install them from the official
44
# PyTorch wheel index (CPU or CUDA builds) before re-running
55
# `pip install -r requirements.txt`.
6-
torch==1.13.1
7-
pytorch-lightning==1.9.0
6+
7+
torch==1.13.1; python_version < "3.11"
8+
torch>=2.1; python_version >= "3.12"
9+
10+
pytorch-lightning==1.9.*; python_version < "3.11"
11+
pytorch-lightning>=2.1,<3.0; python_version >= "3.12"
12+
813
torchvision
914
numpy
1015
kornia

0 commit comments

Comments
 (0)