Skip to content

Commit a1b29f1

Browse files
committed
Address PR comments
1 parent 210f9f1 commit a1b29f1

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

doc/using_mxnet.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -532,8 +532,8 @@ For more information on how to enable MXNet to interact with Amazon Elastic Infe
532532
Model serving
533533
^^^^^^^^^^^^^
534534

535-
After the SageMaker model server has loaded your model, by calling either the default ``model_fn`` or the implementation in your script, SageMaker will serve your model.
536-
Model serving is the process of responding to inference requests, received by SageMaker InvokeEndpoint API calls.
535+
After the SageMaker model server loads your model by calling either the default ``model_fn`` or the implementation in your script, SageMaker serves your model.
536+
Model serving is the process of responding to inference requests received by SageMaker ``InvokeEndpoint`` API calls.
537537
Defining how to handle these requests can be done in one of two ways:
538538

539539
- using ``input_fn``, ``predict_fn``, and ``output_fn``, some of which may be your own implementations
@@ -672,15 +672,15 @@ The ``output_fn`` has the following signature:
672672
673673
def output_fn(prediction, content_type)
674674
675-
Where ``prediction`` is the result of invoking ``predict_fn`` and
676-
``content_type`` is the InvokeEndpoint requested response content type. The function should return a byte array of data serialized to the expected content type.
675+
Where ``prediction`` is the result of invoking ``predict_fn`` and ``content_type`` is the requested response content type for ``InvokeEndpoint``.
676+
The function should return an array of bytes serialized to the expected content type.
677677

678678
The default implementation expects ``prediction`` to be an ``NDArray`` and can serialize the result to either JSON or CSV. It accepts response content types of "application/json" and "text/csv".
679679

680680
Using ``transform_fn``
681681
''''''''''''''''''''''
682682

683-
If you would rather not structure your code around the three methods described above, you can also define your own ``transform_fn`` to handle inference requests. This function has the following signature:
683+
If you would rather not structure your code around the three methods described above, you can instead define your own ``transform_fn`` to handle inference requests. This function has the following signature:
684684

685685
.. code:: python
686686

src/sagemaker/mxnet/README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,8 @@ For more information on how to enable MXNet to interact with Amazon Elastic Infe
538538
Model serving
539539
^^^^^^^^^^^^^
540540

541-
After the SageMaker model server has loaded your model, by calling either the default ``model_fn`` or the implementation in your script, SageMaker will serve your model.
542-
Model serving is the process of responding to inference requests, received by SageMaker InvokeEndpoint API calls.
541+
After the SageMaker model server loads your model by calling either the default ``model_fn`` or the implementation in your script, SageMaker serves your model.
542+
Model serving is the process of responding to inference requests received by SageMaker ``InvokeEndpoint`` API calls.
543543
Defining how to handle these requests can be done in one of two ways:
544544

545545
- using ``input_fn``, ``predict_fn``, and ``output_fn``, some of which may be your own implementations
@@ -678,15 +678,15 @@ The ``output_fn`` has the following signature:
678678
679679
def output_fn(prediction, content_type)
680680
681-
Where ``prediction`` is the result of invoking ``predict_fn`` and
682-
``content_type`` is the InvokeEndpoint requested response content type. The function should return a byte array of data serialized to the expected content type.
681+
Where ``prediction`` is the result of invoking ``predict_fn`` and ``content_type`` is the requested response content type for ``InvokeEndpoint``.
682+
The function should return an array of bytes serialized to the expected content type.
683683

684684
The default implementation expects ``prediction`` to be an ``NDArray`` and can serialize the result to either JSON or CSV. It accepts response content types of "application/json" and "text/csv".
685685

686686
Using ``transform_fn``
687687
''''''''''''''''''''''
688688

689-
If you would rather not structure your code around the three methods described above, you can also define your own ``transform_fn`` to handle inference requests. This function has the following signature:
689+
If you would rather not structure your code around the three methods described above, you can instead define your own ``transform_fn`` to handle inference requests. This function has the following signature:
690690

691691
.. code:: python
692692

0 commit comments

Comments
 (0)