Created
June 7, 2018 09:16
-
-
Save metal3d/b5a250836c25633c9ba49fea171b7fe6 to your computer and use it in GitHub Desktop.
Sagmaker prediction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sagemaker.predictor import RealTimePredictor | |
from sagemaker.predictor import json_serializer | |
# get the name in SageMaker interface and put it there | |
endpoint = 'name of your endpoint' | |
# you can use other serializer, or none if you are able | |
# to get data in binary format | |
predictor = RealTimePredictor(endpoint, serializer=json_serializer) | |
# and call prediction as previously | |
res = predict(some_data) | |
print(res) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment