Skip to content

Commit b022f1a

Browse files
authored
Add FAQ entry to README explaining how to predict against existing endpoints (#37)
* Add FAQ entry showing how to make predictions against existing endpoint * Fix code block formatting
1 parent 7ef5771 commit b022f1a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,3 +1506,24 @@ Once you have the aws cli installed, you can upload a directory of files to S3 w
15061506
aws s3 cp /tmp/foo/ s3://bucket/path
15071507
15081508
You can read more about using the aws cli for manipulating S3 resources in the `AWS cli command reference <http://docs.aws.amazon.com/cli/latest/reference/s3/index.html>`__.
1509+
1510+
1511+
How do I make predictions against an existing endpoint?
1512+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1513+
Create a Predictor object and provide it your endpoint name. Then, simply call its predict() method with your input.
1514+
1515+
You can either use the generic RealTimePredictor class, which by default does not perform any serialization/deserialization transformations on your input, but can be configured to do so through constructor arguments:
1516+
http://sagemaker.readthedocs.io/en/latest/predictors.html
1517+
1518+
Or you can use the TensorFlow / MXNet specific predictor classes, which have default serialization/deserialization logic:
1519+
http://sagemaker.readthedocs.io/en/latest/sagemaker.tensorflow.html#tensorflow-predictor
1520+
http://sagemaker.readthedocs.io/en/latest/sagemaker.mxnet.html#mxnet-predictor
1521+
1522+
Example code using the TensorFlow predictor:
1523+
1524+
::
1525+
1526+
from sagemaker.tensorflow import TensorFlowPredictor
1527+
1528+
predictor = TensorFlowPredictor('myexistingendpoint')
1529+
result = predictor.predict(['my request body'])

0 commit comments

Comments
 (0)