Skip to content

Commit 2a91b30

Browse files
committed
doc: add documentation for image_uri serverless use case
1 parent 242d6ed commit 2a91b30

File tree

7 files changed

+47
-21
lines changed

7 files changed

+47
-21
lines changed

src/sagemaker/chainer/model.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,14 @@ def __init__(
9999
file which should be executed as the entry point to model
100100
hosting. If ``source_dir`` is specified, then ``entry_point``
101101
must point to a file located at the root of ``source_dir``.
102-
image_uri (str): A Docker image URI (default: None). If not specified, a
103-
default image for Chainer will be used. If ``framework_version``
104-
or ``py_version`` are ``None``, then ``image_uri`` is required. If
105-
also ``None``, then a ``ValueError`` will be raised.
102+
image_uri (str): A Docker image URI (default: None). In serverless
103+
inferece, it is required. More image information can be found in
104+
`Amazon SageMaker provided algorithms and Deep Learning Containers
105+
<https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-algo-docker-registry-paths.html>`_.
106+
In instance based inference, if not specified, a default image for
107+
Chainer will be used. If ``framework_version`` or ``py_version``
108+
are ``None``, then ``image_uri`` is required. If also ``None``,
109+
then a ``ValueError`` will be raised.
106110
framework_version (str): Chainer version you want to use for
107111
executing your model training code. Defaults to ``None``. Required
108112
unless ``image_uri`` is provided.

src/sagemaker/huggingface/model.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,11 @@ def __init__(
133133
py_version (str): Python version you want to use for executing your
134134
model training code. Defaults to ``None``. Required unless
135135
``image_uri`` is provided.
136-
image_uri (str): A Docker image URI. Defaults to None. If not specified, a
136+
image_uri (str): A Docker image URI. Defaults to None. In serverless
137+
inferece, it is required. More image information can be found in
138+
`Amazon SageMaker provided algorithms and Deep Learning Containers
139+
<https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-algo-docker-registry-paths.html>`_.
140+
In instance based inference, if not specified, a
137141
default image for PyTorch will be used. If ``framework_version``
138142
or ``py_version`` are ``None``, then ``image_uri`` is required. If
139143
also ``None``, then a ``ValueError`` will be raised.

src/sagemaker/mxnet/model.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,12 @@ def __init__(
107107
py_version (str): Python version you want to use for executing your
108108
model training code. Defaults to ``None``. Required unless
109109
``image_uri`` is provided.
110-
image_uri (str): A Docker image URI (default: None). If not specified, a
111-
default image for MXNet will be used.
112-
110+
image_uri (str): A Docker image URI (default: None). In serverless
111+
inferece, it is required. More image information can be found in
112+
`Amazon SageMaker provided algorithms and Deep Learning Containers
113+
<https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-algo-docker-registry-paths.html>`_.
114+
In instance based inference, if not specified, a default image for
115+
MXNet will be used.
113116
If ``framework_version`` or ``py_version`` are ``None``, then
114117
``image_uri`` is required. If also ``None``, then a ``ValueError``
115118
will be raised.

src/sagemaker/pytorch/model.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,14 @@ def __init__(
107107
py_version (str): Python version you want to use for executing your
108108
model training code. Defaults to ``None``. Required unless
109109
``image_uri`` is provided.
110-
image_uri (str): A Docker image URI (default: None). If not specified, a
111-
default image for PyTorch will be used. If ``framework_version``
112-
or ``py_version`` are ``None``, then ``image_uri`` is required. If
113-
also ``None``, then a ``ValueError`` will be raised.
110+
image_uri (str): A Docker image URI (default: None). In serverless
111+
inferece, it is required. More image information can be found in
112+
`Amazon SageMaker provided algorithms and Deep Learning Containers
113+
<https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-algo-docker-registry-paths.html>`_.
114+
In instance based inference, if not specified, a default image for
115+
PyTorch will be used. If ``framework_version`` or ``py_version`` are
116+
``None``, then ``image_uri`` is required. If also ``None``, then a
117+
``ValueError`` will be raised.
114118
predictor_cls (callable[str, sagemaker.session.Session]): A function
115119
to call to create a predictor with an endpoint name and
116120
SageMaker ``Session``. If specified, ``deploy()`` returns the

src/sagemaker/sklearn/model.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,12 @@ def __init__(
102102
model training code (default: 'py3'). Currently, 'py3' is the only
103103
supported version. If ``None`` is passed in, ``image_uri`` must be
104104
provided.
105-
image_uri (str): A Docker image URI (default: None). If not specified, a
106-
default image for Scikit-learn will be used.
107-
105+
image_uri (str): A Docker image URI (default: None). In serverless
106+
inferece, it is required. More image information can be found in
107+
`Amazon SageMaker provided algorithms and Deep Learning Containers
108+
<https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-algo-docker-registry-paths.html>`_.
109+
In instance based inference, if not specified, a default image for
110+
Scikit-learn will be used.
108111
If ``framework_version`` or ``py_version`` are ``None``, then
109112
``image_uri`` is required. If also ``None``, then a ``ValueError``
110113
will be raised.

src/sagemaker/tensorflow/model.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,14 @@ def __init__(
145145
file which should be executed as the entry point to model
146146
hosting. If ``source_dir`` is specified, then ``entry_point``
147147
must point to a file located at the root of ``source_dir``.
148-
image_uri (str): A Docker image URI (default: None). If not specified, a
149-
default image for TensorFlow Serving will be used. If
150-
``framework_version`` is ``None``, then ``image_uri`` is required.
151-
If also ``None``, then a ``ValueError`` will be raised.
148+
image_uri (str): A Docker image URI (default: None). In serverless
149+
inferece, it is required. More image information can be found in
150+
`Amazon SageMaker provided algorithms and Deep Learning Containers
151+
<https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-algo-docker-registry-paths.html>`_.
152+
In instance based inference, if not specified, a default image for
153+
TensorFlow Serving will be used. If ``framework_version`` is ``None``,
154+
then ``image_uri`` is required. If also ``None``, then a ``ValueError``
155+
will be raised.
152156
framework_version (str): Optional. TensorFlow Serving version you
153157
want to use. Defaults to ``None``. Required unless ``image_uri`` is
154158
provided.

src/sagemaker/xgboost/model.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,12 @@ def __init__(
9191
entry_point (str): Path (absolute or relative) to the Python source file which should
9292
be executed as the entry point to model hosting. If ``source_dir`` is specified,
9393
then ``entry_point`` must point to a file located at the root of ``source_dir``.
94-
image_uri (str): A Docker image URI (default: None). If not specified, a default image
95-
for XGBoost is be used.
94+
image_uri (str): A Docker image URI (default: None). In serverless inferece, it is
95+
required. More image information can be found in
96+
`Amazon SageMaker provided algorithms and Deep Learning Containers
97+
<https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-algo-docker-registry-paths.html>`_.
98+
In instance based inference, if not specified, a default image for XGBoost
99+
is be used.
96100
py_version (str): Python version you want to use for executing your model training code
97101
(default: 'py3').
98102
framework_version (str): XGBoost version you want to use for executing your model

0 commit comments

Comments
 (0)