Skip to content

Commit af4b3e3

Browse files
eslesar-awslaurenyu
authored andcommitted
doc: update using_tensorflow topic (#946)
1 parent 946adeb commit af4b3e3

File tree

9 files changed

+3545
-3110
lines changed

9 files changed

+3545
-3110
lines changed

doc/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def __getattr__(cls, name):
6060
"sphinx.ext.coverage",
6161
"sphinx.ext.autosummary",
6262
"sphinx.ext.napoleon",
63+
"sphinx.ext.autosectionlabel",
6364
]
6465

6566
# Add any paths that contain templates here, relative to this directory.
@@ -95,3 +96,6 @@ def __getattr__(cls, name):
9596

9697
# autosummary
9798
autosummary_generate = True
99+
100+
# autosectionlabel
101+
autosectionlabel_prefix_document = True

doc/overview.rst

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -826,59 +826,6 @@ A new training job channel, named ``code``, will be added with that S3 URI. Bef
826826
827827
Once the training job begins, the training container will look at the offline input ``code`` channel to install dependencies and run the entry script. This isolates the training container, so no inbound or outbound network calls can be made.
828828
829-
*********
830-
BYO Model
831-
*********
832-
833-
You can also create an endpoint from an existing model rather than training one.
834-
That is, you can bring your own model:
835-
836-
First, package the files for the trained model into a ``.tar.gz`` file, and upload the archive to S3.
837-
838-
Next, create a ``Model`` object that corresponds to the framework that you are using: `MXNetModel <https://sagemaker.readthedocs.io/en/stable/sagemaker.mxnet.html#mxnet-model>`__ or `TensorFlowModel <https://sagemaker.readthedocs.io/en/stable/sagemaker.tensorflow.html#tensorflow-model>`__.
839-
840-
Example code using ``MXNetModel``:
841-
842-
.. code:: python
843-
844-
from sagemaker.mxnet.model import MXNetModel
845-
846-
sagemaker_model = MXNetModel(model_data='s3://path/to/model.tar.gz',
847-
role='arn:aws:iam::accid:sagemaker-role',
848-
entry_point='entry_point.py')
849-
850-
After that, invoke the ``deploy()`` method on the ``Model``:
851-
852-
.. code:: python
853-
854-
predictor = sagemaker_model.deploy(initial_instance_count=1,
855-
instance_type='ml.m4.xlarge')
856-
857-
This returns a predictor the same way an ``Estimator`` does when ``deploy()`` is called. You can now get inferences just like with any other model deployed on Amazon SageMaker.
858-
859-
Git support is also available when you bring your own model, through which you can use inference scripts stored in your
860-
Git repositories. The process is similar to using Git support for training jobs. You can simply provide ``git_config``
861-
when create the ``Model`` object, and let ``entry_point``, ``source_dir`` and ``dependencies`` (if needed) be relative
862-
paths inside the Git repository:
863-
864-
.. code:: python
865-
866-
git_config = {'repo': 'https://github.com/username/repo-with-training-scripts.git',
867-
'branch': 'branch1',
868-
'commit': '4893e528afa4a790331e1b5286954f073b0f14a2'}
869-
870-
sagemaker_model = MXNetModel(model_data='s3://path/to/model.tar.gz',
871-
role='arn:aws:iam::accid:sagemaker-role',
872-
entry_point='inference.py',
873-
source_dir='mxnet',
874-
git_config=git_config)
875-
876-
A full example is available in the `Amazon SageMaker examples repository <https://github.com/awslabs/amazon-sagemaker-examples/tree/master/advanced_functionality/mxnet_mnist_byom>`__.
877-
878-
You can also find this notebook in the **Advanced Functionality** section of the **SageMaker Examples** section in a notebook instance.
879-
For information about using sample notebooks in a SageMaker notebook instance, see `Use Example Notebooks <https://docs.aws.amazon.com/sagemaker/latest/dg/howitworks-nbexamples.html>`__
880-
in the AWS documentation.
881-
882829
*******************
883830
Inference Pipelines
884831
*******************

doc/using_chainer.rst

Lines changed: 698 additions & 698 deletions
Large diffs are not rendered by default.

doc/using_mxnet.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,8 @@ Calling fit
411411

412412
You start your training script by calling ``fit`` on an ``MXNet`` Estimator. ``fit`` takes both required and optional arguments.
413413

414-
Required argument
415-
'''''''''''''''''
414+
fit Required argument
415+
'''''''''''''''''''''
416416

417417
- ``inputs``: This can take one of the following forms: A string
418418
S3 URI, for example ``s3://my-bucket/my-training-data``. In this
@@ -430,8 +430,8 @@ For example:
430430
431431
.. optional-arguments-1:
432432
433-
Optional arguments
434-
''''''''''''''''''
433+
fit Optional arguments
434+
''''''''''''''''''''''
435435

436436
- ``wait``: Defaults to True, whether to block and wait for the
437437
training script to complete before returning.

0 commit comments

Comments
 (0)