Re-Deploying Trained Models when using Sagemaker Jumpstart

Apollo Software Labs
AWS Tip
Published in
1 min readMay 25, 2022

--

Sagemaker Jumpstart provides sample notebooks to quickly get started on various solutions. See aws blog. The sample notebooks guide you through the below high level steps.

  1. Set Up
  2. Deploy a Pre-Trained Model
  3. Fine-Tune a Model
  4. Deploy the fine tuned model
  5. Run Inference on the fine tuned model
  6. Delete the endpoint

But the instructions are not clear on how you can repeat steps 4–6 whenever needed without having to start from scratch.

For example, the Introduction to Jumpstart — Object Detection notebook provides no details at the end on how to re-deploy the fine tuned model obtained from one complete execution of the notebook, so that we can run inference against new sample images obtained later.

Steps to Re-Deploy the Fine-Tuned Model

Capture uri(s) — During the first pass execution of the notebook, after deploying the fine tuned model, i.e. after the od_estimator.deploy() step, add and run snippet below to capture the uri(s).

Re-Deploy endpoint — If you executed the last step of the example notebook and deleted the endpoint deployment previously to avoid GPU costs, use snippet below to re-deploy the fine tuned model.
(Assumption: You deleted the endpoints previously, but not the S3 bucket folder containing the model data model.tar.gz)

This will allow you re-deploy the fine tuned model as needed and run inference against new sample images, and then tear down the endpoint to avoid expensive GPU related costs.

--

--

Hands-on Solution Architect passionate about building secure, scalable, and high performance solutions in the cloud.