Last active
January 20, 2021 11:32
-
-
Save sengstacken/75c168839272dc6d290a61a87f744b6d to your computer and use it in GitHub Desktop.
Connect to deployed endpoint
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
# TensorFlow | |
# https://sagemaker.readthedocs.io/en/stable/frameworks/tensorflow/deploying_tensorflow_serving.html | |
end_point_name = 'keras-tf-fmnist-2020-10-13-22-25-23' | |
predictor = sagemaker.tensorflow.model.TensorFlowPredictor(end_point_name,sagemaker_session=sess) | |
# PyTorch | |
## OPTIONAL | |
end_point_name = 'pytorch-inference-2021-01-20-04-00-19-786' | |
predictor = sagemaker.pytorch.model.PyTorchPredictor(end_point_name,sagemaker_session=sagemaker_session,serializer=sagemaker.serializers.JSONSerializer(), deserializer=sagemaker.deserializers.JSONDeserializer()) | |
# MXNet | |
# | |
# Built In Sagemaker | |
end_point_name = 'keras-tf-fmnist-2020-10-13-22-25-23' | |
predictor = sagemaker.predictor.RealTimePredictor(end_point_name,sagemaker_session=sess) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment