Skip to content

Load endpoint? #36

Closed
Closed

Description

@yash1

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?

Activity

  1. winstonaws commented on Jan 3, 2018

    @winstonaws
    Contributor

    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'])
    
  2. winstonaws commented on Jan 5, 2018

    @winstonaws
    Contributor

    Added answer to the FAQ on our README as well. Please reopen if you have further questions.

  3. added a commit that references this issue on May 31, 2018
  4. added a commit that references this issue on Nov 15, 2018
  5. added a commit that references this issue on Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions