Skip to content

doc: add clarification around framework version constants #761

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/sagemaker/chainer/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
from __future__ import absolute_import

CHAINER_VERSION = '4.1.0'
"""Default Chainer version for when the framework version is not specified.
This is no longer updated so as to not break existing workflows.
"""
4 changes: 3 additions & 1 deletion src/sagemaker/chainer/estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class Chainer(Framework):
_additional_mpi_options = "sagemaker_additional_mpi_options"

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

def __init__(self, entry_point, use_mpi=None, num_processes=None, process_slots_per_host=None,
additional_mpi_options=None, source_dir=None, hyperparameters=None, py_version='py3',
Expand Down Expand Up @@ -73,7 +74,8 @@ def __init__(self, entry_point, use_mpi=None, num_processes=None, process_slots_
py_version (str): Python version you want to use for executing your model training code (default: 'py2').
One of 'py2' or 'py3'.
framework_version (str): Chainer version you want to use for executing your model training code.
List of supported versions https://github.com/aws/sagemaker-python-sdk#chainer-sagemaker-estimators
List of supported versions https://github.com/aws/sagemaker-python-sdk#chainer-sagemaker-estimators.
If not specified, this will default to 4.1.
image_name (str): If specified, the estimator will use this image for training and hosting, instead of
selecting the appropriate SageMaker official image based on framework_version and py_version. It can
be an ECR url or dockerhub image and tag.
Expand Down
3 changes: 3 additions & 0 deletions src/sagemaker/mxnet/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
from __future__ import absolute_import

MXNET_VERSION = '1.2'
"""Default MXNet version for when the framework version is not specified.
This is no longer updated so as to not break existing workflows.
"""
6 changes: 4 additions & 2 deletions src/sagemaker/mxnet/estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ class MXNet(Framework):
"""Handle end-to-end training and deployment of custom MXNet code."""

__framework_name__ = 'mxnet'

_LOWEST_SCRIPT_MODE_VERSION = ['1', '3']

LATEST_VERSION = '1.3'
"""The latest version of MXNet included in the SageMaker pre-built Docker images."""

def __init__(self, entry_point, source_dir=None, hyperparameters=None, py_version='py2',
framework_version=None, image_name=None, distributions=None, **kwargs):
Expand Down Expand Up @@ -59,7 +60,8 @@ def __init__(self, entry_point, source_dir=None, hyperparameters=None, py_versio
py_version (str): Python version you want to use for executing your model training code (default: 'py2').
One of 'py2' or 'py3'.
framework_version (str): MXNet version you want to use for executing your model training code.
List of supported versions https://github.com/aws/sagemaker-python-sdk#mxnet-sagemaker-estimators
List of supported versions https://github.com/aws/sagemaker-python-sdk#mxnet-sagemaker-estimators.
If not specified, this will default to 1.2.1.
image_name (str): If specified, the estimator will use this image for training and hosting, instead of
selecting the appropriate SageMaker official image based on framework_version and py_version. It can
be an ECR url or dockerhub image and tag.
Expand Down
4 changes: 4 additions & 0 deletions src/sagemaker/pytorch/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,8 @@
from __future__ import absolute_import

PYTORCH_VERSION = '0.4'
"""Default PyTorch version for when the framework version is not specified.
This is no longer updated so as to not break existing workflows.
"""

PYTHON_VERSION = 'py3'
4 changes: 3 additions & 1 deletion src/sagemaker/pytorch/estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class PyTorch(Framework):
__framework_name__ = "pytorch"

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

def __init__(self, entry_point, source_dir=None, hyperparameters=None, py_version=PYTHON_VERSION,
framework_version=None, image_name=None, **kwargs):
Expand Down Expand Up @@ -58,7 +59,8 @@ def __init__(self, entry_point, source_dir=None, hyperparameters=None, py_versio
py_version (str): Python version you want to use for executing your model training code (default: 'py3').
One of 'py2' or 'py3'.
framework_version (str): PyTorch version you want to use for executing your model training code.
List of supported versions https://github.com/aws/sagemaker-python-sdk#pytorch-sagemaker-estimators
List of supported versions https://github.com/aws/sagemaker-python-sdk#pytorch-sagemaker-estimators.
If not specified, this will default to 0.4.
image_name (str): If specified, the estimator will use this image for training and hosting, instead of
selecting the appropriate SageMaker official image based on framework_version and py_version. It can
be an ECR url or dockerhub image and tag.
Expand Down
3 changes: 3 additions & 0 deletions src/sagemaker/tensorflow/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
from __future__ import absolute_import

TF_VERSION = '1.11'
"""Default TF version for when the framework version is not specified.
This is no longer updated so as to not break existing workflows.
"""
5 changes: 4 additions & 1 deletion src/sagemaker/tensorflow/estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ class TensorFlow(Framework):
"""Handle end-to-end training and deployment of user-provided TensorFlow code."""

__framework_name__ = 'tensorflow'

LATEST_VERSION = '1.12'
"""The latest version of TensorFlow included in the SageMaker pre-built Docker images."""

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