Skip to content

Commit 6a374a6

Browse files
authored
Update using_tf.rst
Added example of creating an Estimator using an ECR URI
1 parent 78b683d commit 6a374a6

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

doc/frameworks/tensorflow/using_tf.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,26 @@ The following args are not permitted when using Script Mode:
197197
Where the S3 url is a path to your training data within Amazon S3.
198198
The constructor keyword arguments define how SageMaker runs your training script.
199199

200+
Create an Estimator using Docker containers
201+
-------------------------------------------
202+
203+
You can also create an Estimator using Docker containers by specifying the ECR URI for the Python and framework version directly. For a full list of available container URIs, see `Available Deep Learning Containers Images <https://github.com/aws/deep-learning-containers/blob/master/available_images.md>`__ For more information on using Docker containers, see `Use Your Own Algorithms or Models with Amazon SageMaker <https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html>`__.
204+
205+
When creating an Estimator using a container, you must use the ``image_name=''`` arg to replace both of the following args:
206+
207+
- ``py_version=''``
208+
- ``framework_version=''``
209+
210+
The following example uses the ``image_name='763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:1.15.2-cpu-py37-ubuntu18.04'`` arg to specify the container image, Python version, and framework version:
211+
212+
.. code:: python
213+
214+
tf_estimator = TensorFlow(entry_point='tf-train.py',
215+
role='SageMakerRole',
216+
train_instance_count=1,
217+
train_instance_type='ml.p2.xlarge',
218+
image_name='763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training:1.15.2-cpu-py37-ubuntu18.04',
219+
script_mode=True)
200220
For more information about the sagemaker.tensorflow.TensorFlow estimator, see `SageMaker TensorFlow Classes`_.
201221

202222
Call the fit Method

0 commit comments

Comments
 (0)