Skip to content

Commit 840e7df

Browse files
committed
pytorch min version 1.7
Signed-off-by: Richard Brown <[email protected]>
1 parent 7f43b00 commit 840e7df

File tree

11 files changed

+13
-17
lines changed

11 files changed

+13
-17
lines changed

.github/workflows/cron.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: [self-hosted, linux, x64, common]
1616
strategy:
1717
matrix:
18-
pytorch-version: [1.6.0, 1.7.1, 1.8.1, 1.9.1, latest]
18+
pytorch-version: [1.7.1, 1.8.1, 1.9.1, latest]
1919
steps:
2020
- uses: actions/checkout@v2
2121
- name: Install the dependencies
@@ -25,8 +25,6 @@ jobs:
2525
python -m pip uninstall -y torch torchvision
2626
if [ ${{ matrix.pytorch-version }} == "latest" ]; then
2727
python -m pip install torch torchvision
28-
elif [ ${{ matrix.pytorch-version }} == "1.6.0" ]; then
29-
python -m pip install torch==1.6.0 torchvision==0.7.0
3028
elif [ ${{ matrix.pytorch-version }} == "1.7.1" ]; then
3129
python -m pip install torch==1.7.1 torchvision==0.8.2
3230
elif [ ${{ matrix.pytorch-version }} == "1.8.1" ]; then

.github/workflows/pythonapp-min.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ jobs:
119119
strategy:
120120
fail-fast: false
121121
matrix:
122-
pytorch-version: [1.6.0, 1.7.1, 1.8.1, 1.9.1, 1.10.1, latest]
122+
pytorch-version: [1.7.1, 1.8.1, 1.9.1, 1.10.1, latest]
123123
timeout-minutes: 40
124124
steps:
125125
- uses: actions/checkout@v2
@@ -148,8 +148,6 @@ jobs:
148148
# min. requirements
149149
if [ ${{ matrix.pytorch-version }} == "latest" ]; then
150150
python -m pip install torch
151-
elif [ ${{ matrix.pytorch-version }} == "1.6.0" ]; then
152-
python -m pip install torch==1.6.0
153151
elif [ ${{ matrix.pytorch-version }} == "1.7.1" ]; then
154152
python -m pip install torch==1.7.1
155153
elif [ ${{ matrix.pytorch-version }} == "1.8.1" ]; then

.github/workflows/pythonapp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ jobs:
137137
# install the latest pytorch for testing
138138
# however, "pip install monai*.tar.gz" will build cpp/cuda with an isolated
139139
# fresh torch installation according to pyproject.toml
140-
python -m pip install torch>=1.6 torchvision
140+
python -m pip install torch>=1.7 torchvision
141141
- name: Check packages
142142
run: |
143143
pip uninstall monai

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ the postprocessing steps should be used before calling the metrics methods
403403
* Progress bar with tqdm
404404

405405
### Changed
406-
* Now fully compatible with PyTorch 1.6
406+
* Now fully compatible with PyTorch 1.7
407407
* Base Docker image upgraded to `nvcr.io/nvidia/pytorch:20.08-py3` from `nvcr.io/nvidia/pytorch:20.03-py3`
408408
* Code contributions now require signing off on the [Developer Certificate of Origin (DCO)](https://developercertificate.org/)
409409
* Major work in type hinting finished

docs/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
-f https://download.pytorch.org/whl/cpu/torch-1.6.0%2Bcpu-cp37-cp37m-linux_x86_64.whl
2-
torch>=1.6
1+
-f https://download.pytorch.org/whl/cpu/torch-1.7.0%2Bcpu-cp37-cp37m-linux_x86_64.whl
2+
torch>=1.7
33
pytorch-ignite==0.4.8
44
numpy>=1.17
55
itk>=5.2

environment-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ channels:
55
- conda-forge
66
dependencies:
77
- numpy>=1.17
8-
- pytorch>=1.6
8+
- pytorch>=1.7
99
- coverage>=5.5
1010
- parameterized
1111
- setuptools>=50.3.0,!=60.0.0

monai/apps/mmars/mmars.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def download_mmar(
135135
if has_home:
136136
mmar_dir = Path(get_dir()) / "mmars"
137137
else:
138-
raise ValueError("mmar_dir=None, but no suitable default directory computed. Upgrade Pytorch to 1.6+ ?")
138+
raise ValueError("mmar_dir=None, but no suitable default directory computed. Upgrade Pytorch to 1.7+ ?")
139139
mmar_dir = Path(mmar_dir)
140140
if api:
141141
model_dict = _get_all_ngc_models(item.get(Keys.NAME, f"{item}") if isinstance(item, Mapping) else f"{item}")

monai/data/torchscript_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def save_net_with_metadata(
8080

8181
json_data = json.dumps(metadict)
8282

83-
# Pytorch>1.6 can use dictionaries directly, otherwise need to use special map object
83+
# Pytorch>1.7 can use dictionaries directly, otherwise need to use special map object
8484
if pytorch_after(1, 7):
8585
extra_files = {METADATA_FILENAME: json_data.encode()}
8686

@@ -123,7 +123,7 @@ def load_net_with_metadata(
123123
Returns:
124124
Triple containing loaded object, metadata dict, and extra files dict containing other file data if present
125125
"""
126-
# Pytorch>1.6 can use dictionaries directly, otherwise need to use special map object
126+
# Pytorch>1.7 can use dictionaries directly, otherwise need to use special map object
127127
if pytorch_after(1, 7):
128128
extra_files = {f: "" for f in more_extra_files}
129129
extra_files[METADATA_FILENAME] = ""

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
requires = [
33
"wheel",
44
"setuptools",
5-
"torch>=1.6",
5+
"torch>=1.7",
66
"ninja",
77
]
88

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
torch>=1.6
1+
torch>=1.7
22
numpy>=1.17

0 commit comments

Comments
 (0)