Skip to content

Commit 910d9f8

Browse files
authored
change: update PyTorch version (#947)
1 parent 2dfe7d3 commit 910d9f8

File tree

6 files changed

+43
-40
lines changed

6 files changed

+43
-40
lines changed

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ PyTorch SageMaker Estimators
221221

222222
With PyTorch SageMaker Estimators, you can train and host PyTorch models on Amazon SageMaker.
223223

224-
Supported versions of PyTorch: ``0.4.0``, ``1.0.0``.
224+
Supported versions of PyTorch: ``0.4.0``, ``1.0.0``, ``1.1.0``.
225225

226226
We recommend that you use the latest supported version, because that's where we focus most of our development efforts.
227227

src/sagemaker/pytorch/README.rst

+36-36
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SageMaker PyTorch Estimators and Models
44

55
With PyTorch Estimators and Models, you can train and host PyTorch models on Amazon SageMaker.
66

7-
Supported versions of PyTorch: ``0.4.0``, ``1.0.0``.
7+
Supported versions of PyTorch: ``0.4.0``, ``1.0.0``, ``1.1.0``.
88

99
We recommend that you use the latest supported version, because that's where we focus most of our development efforts.
1010

@@ -37,41 +37,41 @@ This Python version applies to both the Training Job, created by fit, and the En
3737

3838
The PyTorch Docker images have the following dependencies installed:
3939

40-
+-----------------------------+---------------+-------------------+
41-
| Dependencies | pytorch 0.4.0 | pytorch 1.0.0 |
42-
+-----------------------------+---------------+-------------------+
43-
| boto3 | >=1.7.35 | >=1.9.11 |
44-
+-----------------------------+---------------+-------------------+
45-
| botocore | >=1.10.35 | >=1.12.11 |
46-
+-----------------------------+---------------+-------------------+
47-
| CUDA (GPU image only) | 9.0 | 9.0 |
48-
+-----------------------------+---------------+-------------------+
49-
| numpy | >=1.14.3 | >=1.15.2 |
50-
+-----------------------------+---------------+-------------------+
51-
| Pillow | >=5.1.0 | >=5.2.0 |
52-
+-----------------------------+---------------+-------------------+
53-
| pip | >=10.0.1 | >=18.0 |
54-
+-----------------------------+---------------+-------------------+
55-
| python-dateutil | >=2.7.3 | >=2.7.3 |
56-
+-----------------------------+---------------+-------------------+
57-
| retrying | >=1.3.3 | >=1.3.3 |
58-
+-----------------------------+---------------+-------------------+
59-
| s3transfer | >=0.1.13 | >=0.1.13 |
60-
+-----------------------------+---------------+-------------------+
61-
| sagemaker-containers | >=2.1.0 | >=2.1.0 |
62-
+-----------------------------+---------------+-------------------+
63-
| sagemaker-pytorch-container | 1.0 | 1.0 |
64-
+-----------------------------+---------------+-------------------+
65-
| setuptools | >=39.2.0 | >=40.4.3 |
66-
+-----------------------------+---------------+-------------------+
67-
| six | >=1.11.0 | >=1.11.0 |
68-
+-----------------------------+---------------+-------------------+
69-
| torch | 0.4.0 | 1.0.0 |
70-
+-----------------------------+---------------+-------------------+
71-
| torchvision | 0.2.1 | 0.2.1 |
72-
+-----------------------------+---------------+-------------------+
73-
| Python | 2.7 or 3.5 | 2.7 or 3.6 |
74-
+-----------------------------+---------------+-------------------+
40+
+-----------------------------+---------------+-------------------+-------------------+
41+
| Dependencies | pytorch 0.4.0 | pytorch 1.0.0 | pytorch 1.1.0 |
42+
+-----------------------------+---------------+-------------------+-------------------+
43+
| boto3 | >=1.7.35 | >=1.9.11 | 1.9.82 |
44+
+-----------------------------+---------------+-------------------+-------------------+
45+
| botocore | >=1.10.35 | >=1.12.11 | >= 1.12.11 |
46+
+-----------------------------+---------------+-------------------+-------------------+
47+
| CUDA (GPU image only) | 9.0 | 9.0 | 10.1 |
48+
+-----------------------------+---------------+-------------------+-------------------+
49+
| numpy | >=1.14.3 | >=1.15.2 | 1.16.4 |
50+
+-----------------------------+---------------+-------------------+-------------------+
51+
| Pillow | >=5.1.0 | >=5.2.0 | 6.0.0 |
52+
+-----------------------------+---------------+-------------------+-------------------+
53+
| pip | >=10.0.1 | >=18.0 | >=18.0 |
54+
+-----------------------------+---------------+-------------------+-------------------+
55+
| python-dateutil | >=2.7.3 | >=2.7.3 | >=2.7.3 |
56+
+-----------------------------+---------------+-------------------+-------------------+
57+
| retrying | >=1.3.3 | >=1.3.3 | 1.3.3 |
58+
+-----------------------------+---------------+-------------------+-------------------+
59+
| s3transfer | >=0.1.13 | >=0.1.13 | >=0.1.13 |
60+
+-----------------------------+---------------+-------------------+-------------------+
61+
| sagemaker-containers | >=2.1.0 | >=2.1.0 | 2.4.10.post0 |
62+
+-----------------------------+---------------+-------------------+-------------------+
63+
| sagemaker-pytorch-container | 1.0 | 1.1 | 1.2 |
64+
+-----------------------------+---------------+-------------------+-------------------+
65+
| setuptools | >=39.2.0 | >=40.4.3 | >=40.4.3 |
66+
+-----------------------------+---------------+-------------------+-------------------+
67+
| six | >=1.11.0 | >=1.11.0 | 1.12.0 |
68+
+-----------------------------+---------------+-------------------+-------------------+
69+
| torch | 0.4.0 | 1.0.0 | 1.1.0 |
70+
+-----------------------------+---------------+-------------------+-------------------+
71+
| torchvision | 0.2.1 | 0.2.1 | 0.3.0 |
72+
+-----------------------------+---------------+-------------------+-------------------+
73+
| Python | 2.7 or 3.5 | 2.7 or 3.6 | 2.7 or 3.6 |
74+
+-----------------------------+---------------+-------------------+-------------------+
7575

7676
The Docker images extend Ubuntu 16.04.
7777

src/sagemaker/pytorch/defaults.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
PYTORCH_VERSION = "0.4"
1717
"""Default PyTorch version for when the framework version is not specified.
18-
This is no longer updated so as to not break existing workflows.
18+
The latest PyTorch version is 1.1.0, but the default version is no longer updated so as to not break existing workflows.
1919
"""
2020

2121
PYTHON_VERSION = "py3"

src/sagemaker/pytorch/estimator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class PyTorch(Framework):
3434

3535
__framework_name__ = "pytorch"
3636

37-
LATEST_VERSION = "1.0"
37+
LATEST_VERSION = "1.1"
3838
"""The latest version of PyTorch included in the SageMaker pre-built Docker images."""
3939

4040
def __init__(

tests/data/pytorch_mnist/mnist.py

+2
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def _get_train_data_loader(training_dir, is_distributed, batch_size, **kwargs):
4747
transform=transforms.Compose(
4848
[transforms.ToTensor(), transforms.Normalize((0.1307,), (0.3081,))]
4949
),
50+
download=True,
5051
)
5152
train_sampler = (
5253
torch.utils.data.distributed.DistributedSampler(dataset) if is_distributed else None
@@ -70,6 +71,7 @@ def _get_test_data_loader(training_dir, **kwargs):
7071
transform=transforms.Compose(
7172
[transforms.ToTensor(), transforms.Normalize((0.1307,), (0.3081,))]
7273
),
74+
download=True,
7375
),
7476
batch_size=1000,
7577
shuffle=True,

tests/integ/test_git.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
from tests.integ import lock as lock
2323
from sagemaker.mxnet.estimator import MXNet
24+
from sagemaker.pytorch.defaults import PYTORCH_VERSION
2425
from sagemaker.pytorch.estimator import PyTorch
2526
from sagemaker.sklearn.estimator import SKLearn
2627
from sagemaker.mxnet.model import MXNetModel
@@ -60,7 +61,7 @@ def test_git_support_with_pytorch(sagemaker_local_session):
6061
entry_point=script_path,
6162
role="SageMakerRole",
6263
source_dir="pytorch",
63-
framework_version=PyTorch.LATEST_VERSION,
64+
framework_version=PYTORCH_VERSION,
6465
py_version=PYTHON_VERSION,
6566
train_instance_count=1,
6667
train_instance_type="local",

0 commit comments

Comments
 (0)