Skip to content

Commit 7e4fd1d

Browse files
committed
Update overview.rst
1 parent 44afc92 commit 7e4fd1d

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

doc/overview.rst

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ That is, you can bring your own model:
523523

524524
First, package the files for the trained model into a ``.tar.gz`` file, and upload the archive to S3.
525525

526-
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>`__.
526+
Next, create a ``Model`` object that corresponds to the framework that you are using: `MXNetModel <file:///Users/bvveeram/Documents/GitHub/sagemaker-python-sdk/doc/_build/html/sagemaker.mxnet.html#mxnet-model>`__ or `TensorFlowModel <file:///Users/bvveeram/Documents/GitHub/sagemaker-python-sdk/doc/_build/html/sagemaker.tensorflow.html#tensorflow-model>`__.
527527

528528
Example code using ``MXNetModel``:
529529

@@ -681,8 +681,8 @@ in the AWS documentation.
681681

682682
For more detailed explanations of the classes that this library provides for automatic model tuning, see:
683683

684-
- `API docs for HyperparameterTuner and parameter range classes <https://sagemaker.readthedocs.io/en/stable/tuner.html>`__
685-
- `API docs for analytics classes <https://sagemaker.readthedocs.io/en/stable/analytics.html>`__
684+
- `API docs for HyperparameterTuner and parameter range classes <file:///Users/bvveeram/Documents/GitHub/sagemaker-python-sdk/doc/_build/html/tuner.html>`__
685+
- `API docs for analytics classes <file:///Users/bvveeram/Documents/GitHub/sagemaker-python-sdk/doc/_build/html/analytics.html>`__
686686

687687
*************************
688688
SageMaker Batch Transform
@@ -709,7 +709,7 @@ Alternatively, if you already have a SageMaker model, you can create an instance
709709
instance_count=1,
710710
instance_type='ml.m4.xlarge')
711711
712-
For a full list of the possible options to configure by using either of these methods, see the API docs for `Estimator <https://sagemaker.readthedocs.io/en/stable/estimators.html#sagemaker.estimator.Estimator.transformer>`__ or `Transformer <https://sagemaker.readthedocs.io/en/stable/transformer.html#sagemaker.transformer.Transformer>`__.
712+
For a full list of the possible options to configure by using either of these methods, see the API docs for `Estimator <file:///Users/bvveeram/Documents/GitHub/sagemaker-python-sdk/doc/_build/html/estimators.html#sagemaker.estimator.Estimator.transformer>`__ or `Transformer <file:///Users/bvveeram/Documents/GitHub/sagemaker-python-sdk/doc/_build/html/transformer.html#sagemaker.transformer.Transformer>`__.
713713

714714
After you create a ``Transformer`` object, you can invoke ``transform()`` to start a batch transform job with the S3 location of your data.
715715
You can also specify other attributes of your data, such as the content type.
@@ -718,7 +718,7 @@ You can also specify other attributes of your data, such as the content type.
718718
719719
transformer.transform('s3://my-bucket/batch-transform-input')
720720
721-
For more details about what can be specified here, see `API docs <https://sagemaker.readthedocs.io/en/stable/transformer.html#sagemaker.transformer.Transformer.transform>`__.
721+
For more details about what can be specified here, see `API docs <file:///Users/bvveeram/Documents/GitHub/sagemaker-python-sdk/doc/_build/html/transformer.html#sagemaker.transformer.Transformer.transform>`__.
722722

723723
**********
724724
Local Mode
@@ -1063,47 +1063,49 @@ You can also find these notebooks in the **Advanced Functionality** section of t
10631063
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>`__
10641064
in the AWS documentation.
10651065
1066-
*******************
1066+
********************
10671067
Serverless Inference
1068-
*******************
1068+
********************
10691069
10701070
You can use the SageMaker Python SDK to perform serverless inference on Lambda.
10711071
10721072
To deploy models to Lambda, you must complete the following prerequisites:
1073-
1. `Package your model and inference code as a container image. <https://docs.aws.amazon.com/lambda/latest/dg/images-create.html>`_
1074-
2. `Create a role that lists Lambda as a trusted entity. <https://docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html#permissions-executionrole-console>`_
10751073
1076-
After completing the prerequisites, you can deploy your model to Lambda with
1077-
the ``LambdaModel`` class.
1074+
- `Package your model and inference code as a container image. <https://docs.aws.amazon.com/lambda/latest/dg/images-create.html>`_
1075+
- `Create a role that lists Lambda as a trusted entity. <https://docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html#permissions-executionrole-console>`_
1076+
1077+
After completing the prerequisites, you can deploy your model to Lambda using
1078+
the `LambdaModel`_ class.
10781079
10791080
.. code:: python
10801081
10811082
from sagemaker.serverless import LambdaModel
10821083
1083-
image_uri = f"{account}.dkr.ecr.{region}.amazonaws.com/{repository}:latest"
1084-
role = f"arn:aws:iam::{account}:role/{role}"
1084+
image_uri = "123456789012.dkr.ecr.us-west-2.amazonaws.com/my-lambda-repository:latest"
1085+
role = "arn:aws:iam::123456789012:role/MyLambdaExecutionRole"
10851086
10861087
model = LambdaModel(image_uri=image_uri, role=role)
10871088
predictor = model.deploy("my-lambda-function", timeout=20, memory_size=4092)
10881089
1089-
The ``LambdaModel.deploy`` method returns a ``LambdaPredictor`` instance. Use
1090-
the ``LambdaPredictor`` instance to perform inference on Lambda.
1090+
The ``deploy`` method returns a `LambdaPredictor`_ instance. Use the
1091+
`LambdaPredictor`_ ``predict`` method to perform inference on Lambda.
10911092
10921093
.. code:: python
10931094
10941095
url = "https://c.files.bbci.co.uk/12A9B/production/_111434467_gettyimages-1143489763.jpg"
10951096
predictor.predict({"url": url}) # {'class': 'tabby'}
10961097
1097-
Once you are done performing inference on Lambda, delete the ``LambdaModel``
1098-
and ``LambdaPredictor`` instances.
1098+
Once you are done performing inference on Lambda, free the `LambdaModel`_ and
1099+
`LambdaPredictor`_ resources using the ``delete_model`` and ``delete_predictor``
1100+
methods.
10991101
11001102
.. code:: python
11011103
11021104
model.delete_model()
11031105
predictor.delete_predictor()
11041106
1105-
For more details, see the API reference for `LambdaModel <https://sagemaker.readthedocs.io/en/stable/api/inference/model.html#sagemaker.serverless.model.LambdaModel>`_
1106-
and `LambdaPredictor <https://sagemaker.readthedocs.io/en/stable/api/inference/predictor.html#sagemaker.serverless.predictor.LambdaPredictor>`_.
1107+
.. _LambdaModel : file:///Users/bvveeram/Documents/GitHub/sagemaker-python-sdk/doc/_build/html/api/inference/model.html#sagemaker.serverless.model.LambdaModel
1108+
.. _LambdaPredictor : file:///Users/bvveeram/Documents/GitHub/sagemaker-python-sdk/doc/_build/html/api/inference/predictors.html#sagemaker.serverless.predictor.LambdaPredictor
11071109
11081110
******************
11091111
SageMaker Workflow

0 commit comments

Comments
 (0)