From dee79e6bd90b30095267a798da99c4033cc5991b Mon Sep 17 00:00:00 2001 From: Nick Date: Sun, 7 Aug 2022 14:41:38 -0400 Subject: [PATCH] Support python3.10 (#1137) On python3.10, this requires on onnxruntime>=1.12, because that's their only version that has builds published for python 3.10. But earlier should be able to stick with earlier onnxruntimes. To support that, switch from `onnxruntime==1.7.0` to `~=1.7`, aka `>=1.7,<2`. While we're here, also, put upper-bounds on `torch`, because we're worried about shifting too many core dependency too much all at once. We know this dependency policy is inconsistent. We will try to clean it up in https://github.com/ivadomed/ivadomed/issues/1191. Co-authored-by: Etienne Boucher Co-authored-by: Kanishk Kalra <36276423+kanishk16@users.noreply.github.com> Co-authored-by: Yuan Wang --- .github/workflows/run_tests.yml | 2 +- requirements.txt | 6 +++--- setup.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index b891eed98..d53021528 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -66,7 +66,7 @@ jobs: matrix: os: [ "macos-latest", "windows-latest", "ubuntu-20.04", "ubuntu-18.04" ] - python-version: [3.7, 3.8, 3.9 ] + python-version: [ '3.7', '3.8', '3.9', '3.10' ] test-name: - integration-test diff --git a/requirements.txt b/requirements.txt index 3e718e3da..4a9736973 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,7 @@ imageio~=2.19 joblib~=1.0 matplotlib>=3.3.0 nibabel~=3.2 -onnxruntime==1.7.0 +onnxruntime~=1.7 pandas~=1.1 pybids>=0.14.0 scikit-learn>=0.20.3 @@ -21,6 +21,6 @@ tensorboard>=1.15.0 tqdm>=4.30 scipy torchio>=0.18.68 -torch~=1.8.1 -torchvision~=0.9.1 +torch>=1.8.1,<=1.11.0 +torchvision>=0.9.1,<=0.12.0 wandb>=0.12.11 diff --git a/setup.py b/setup.py index 2c15707dc..2df2db0a0 100644 --- a/setup.py +++ b/setup.py @@ -64,7 +64,7 @@ 'Intended Audience :: Developers', 'Programming Language :: Python :: 3', ], - python_requires='>=3.7,<3.10', + python_requires='>=3.7,<3.11', packages=find_packages(exclude=['docs', 'tests']), include_package_data=True, install_requires=requirements,