Load endpoint?
Hi,
How can you load an existing endpoint after you've deployed it for predictions? The notebook example I've seen show end to end training to deployment but what if you want to reuse a previous model just to make predictions?
If you have an existing endpoint, you just need to create a Predictor object and provide it your endpoint name. This will give you an object that is the same as the object created by the Estimators in the end-to-end examples. Then, simply call its predict() method.
You can either use the generic RealTimePredictor class, which does not do any serialization/deserialization logic on your input, but can be configured to do so through constructor arguments: http://sagemaker.readthedocs.io/en/stable/predictors.html
Or you can use the TensorFlow / MXNet specific predictor classes, which have default serialization/deserialization logic: http://sagemaker.readthedocs.io/en/stable/sagemaker.tensorflow.html#tensorflow-predictor http://sagemaker.readthedocs.io/en/stable/sagemaker.mxnet.html#mxnet-predictor
Example code using the TensorFlow predictor:
from sagemaker.tensorflow import TensorFlowPredictor
predictor = TensorFlowPredictor('myexistingendpoint')
result = predictor.predict(['my request body'])
Added answer to the FAQ on our README as well. Please reopen if you have further questions.