Skip to content

Commit e091a53

Browse files
committed
doc: add clarification around framework version constants
1 parent fd10a25 commit e091a53

File tree

8 files changed

+27
-5
lines changed

8 files changed

+27
-5
lines changed

src/sagemaker/chainer/defaults.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@
1313
from __future__ import absolute_import
1414

1515
CHAINER_VERSION = '4.1.0'
16+
"""Default Chainer version for when the framework version is not specified.
17+
This is no longer updated so as to not break existing workflows.
18+
"""

src/sagemaker/chainer/estimator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class Chainer(Framework):
3535
_additional_mpi_options = "sagemaker_additional_mpi_options"
3636

3737
LATEST_VERSION = '5.0.0'
38+
"""The latest version of Chainer included in the SageMaker pre-built Docker images."""
3839

3940
def __init__(self, entry_point, use_mpi=None, num_processes=None, process_slots_per_host=None,
4041
additional_mpi_options=None, source_dir=None, hyperparameters=None, py_version='py3',
@@ -73,7 +74,8 @@ def __init__(self, entry_point, use_mpi=None, num_processes=None, process_slots_
7374
py_version (str): Python version you want to use for executing your model training code (default: 'py2').
7475
One of 'py2' or 'py3'.
7576
framework_version (str): Chainer version you want to use for executing your model training code.
76-
List of supported versions https://github.com/aws/sagemaker-python-sdk#chainer-sagemaker-estimators
77+
List of supported versions https://github.com/aws/sagemaker-python-sdk#chainer-sagemaker-estimators.
78+
If not specified, this will default to 4.1.
7779
image_name (str): If specified, the estimator will use this image for training and hosting, instead of
7880
selecting the appropriate SageMaker official image based on framework_version and py_version. It can
7981
be an ECR url or dockerhub image and tag.

src/sagemaker/mxnet/defaults.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@
1313
from __future__ import absolute_import
1414

1515
MXNET_VERSION = '1.2'
16+
"""Default MXNet version for when the framework version is not specified.
17+
This is no longer updated so as to not break existing workflows.
18+
"""

src/sagemaker/mxnet/estimator.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ class MXNet(Framework):
2727
"""Handle end-to-end training and deployment of custom MXNet code."""
2828

2929
__framework_name__ = 'mxnet'
30-
3130
_LOWEST_SCRIPT_MODE_VERSION = ['1', '3']
31+
3232
LATEST_VERSION = '1.3'
33+
"""The latest version of MXNet included in the SageMaker pre-built Docker images."""
3334

3435
def __init__(self, entry_point, source_dir=None, hyperparameters=None, py_version='py2',
3536
framework_version=None, image_name=None, distributions=None, **kwargs):
@@ -59,7 +60,8 @@ def __init__(self, entry_point, source_dir=None, hyperparameters=None, py_versio
5960
py_version (str): Python version you want to use for executing your model training code (default: 'py2').
6061
One of 'py2' or 'py3'.
6162
framework_version (str): MXNet version you want to use for executing your model training code.
62-
List of supported versions https://github.com/aws/sagemaker-python-sdk#mxnet-sagemaker-estimators
63+
List of supported versions https://github.com/aws/sagemaker-python-sdk#mxnet-sagemaker-estimators.
64+
If not specified, this will default to 1.2.1.
6365
image_name (str): If specified, the estimator will use this image for training and hosting, instead of
6466
selecting the appropriate SageMaker official image based on framework_version and py_version. It can
6567
be an ECR url or dockerhub image and tag.

src/sagemaker/pytorch/defaults.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,8 @@
1313
from __future__ import absolute_import
1414

1515
PYTORCH_VERSION = '0.4'
16+
"""Default PyTorch version for when the framework version is not specified.
17+
This is no longer updated so as to not break existing workflows.
18+
"""
19+
1620
PYTHON_VERSION = 'py3'

src/sagemaker/pytorch/estimator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class PyTorch(Framework):
2929
__framework_name__ = "pytorch"
3030

3131
LATEST_VERSION = '1.0'
32+
"""The latest version of PyTorch included in the SageMaker pre-built Docker images."""
3233

3334
def __init__(self, entry_point, source_dir=None, hyperparameters=None, py_version=PYTHON_VERSION,
3435
framework_version=None, image_name=None, **kwargs):
@@ -58,7 +59,8 @@ def __init__(self, entry_point, source_dir=None, hyperparameters=None, py_versio
5859
py_version (str): Python version you want to use for executing your model training code (default: 'py3').
5960
One of 'py2' or 'py3'.
6061
framework_version (str): PyTorch version you want to use for executing your model training code.
61-
List of supported versions https://github.com/aws/sagemaker-python-sdk#pytorch-sagemaker-estimators
62+
List of supported versions https://github.com/aws/sagemaker-python-sdk#pytorch-sagemaker-estimators.
63+
If not specified, this will default to 0.4.
6264
image_name (str): If specified, the estimator will use this image for training and hosting, instead of
6365
selecting the appropriate SageMaker official image based on framework_version and py_version. It can
6466
be an ECR url or dockerhub image and tag.

src/sagemaker/tensorflow/defaults.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@
1313
from __future__ import absolute_import
1414

1515
TF_VERSION = '1.11'
16+
"""Default TF version for when the framework version is not specified.
17+
This is no longer updated so as to not break existing workflows.
18+
"""

src/sagemaker/tensorflow/estimator.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ class TensorFlow(Framework):
170170
"""Handle end-to-end training and deployment of user-provided TensorFlow code."""
171171

172172
__framework_name__ = 'tensorflow'
173+
173174
LATEST_VERSION = '1.12'
175+
"""The latest version of TensorFlow included in the SageMaker pre-built Docker images."""
174176

175177
def __init__(self, training_steps=None, evaluation_steps=None, checkpoint_path=None, py_version='py2',
176178
framework_version=None, model_dir=None, requirements_file='', image_name=None,
@@ -185,7 +187,8 @@ def __init__(self, training_steps=None, evaluation_steps=None, checkpoint_path=N
185187
saved (default: None). For distributed model training, this parameter is required.
186188
py_version (str): Python version you want to use for executing your model training code (default: 'py2').
187189
framework_version (str): TensorFlow version you want to use for executing your model training code.
188-
List of supported versions https://github.com/aws/sagemaker-python-sdk#tensorflow-sagemaker-estimators
190+
List of supported versions https://github.com/aws/sagemaker-python-sdk#tensorflow-sagemaker-estimators.
191+
If not specified, this will default to 1.11.
189192
model_dir (str): S3 location where the checkpoint data and models can be exported to during training
190193
(default: None). If not specified a default S3 URI will be generated. It will be passed in the
191194
training script as one of the command line arguments.

0 commit comments

Comments
 (0)