• Products
  • Documentation
  • Resources

Set up the AWS SageMaker pre-trained model

To demonstrate how to develop, deploy, and manage applications using Jira Software and various connected tools, our team created ImageLabeller, a simple demo application built on AWS that uses machine learning to apply labels to images.

This page covers how to setup an AWS SageMaker predefined model, a prerequisite for ImageLabeller to successfully process images. Before you begin, we recommend reading the ImageLabeller architecture for context.

Log in to AWS Console and navigate to Amazon SageMaker.

Screenshot of AWS console

Go to Amazon SageMaker Studio.

Screenshot of Amazon SageMaker Studio

Choose Quick start > Execution role > Create an IAM role.

Screenshot of Quick start

Click Create role. Then click Submit.

Screenshot of Create an IAM role

SageMaker will take a while to setup. Once it’s ready, click Open Studio.

Screenshot of post-setup

Click Go to SageMake JumpStart.

Screenshot of SageMaker JumpStart

Locate, and click on Inception V3.

Screenshot of vision models

Change the Machine Type to ml.m5.large, change the Endpoint Name to something more readable like “image-labeller-endpoint”, and click Deploy.

Screenshot of deploy model

AWS SageMaker will start to deploy the model.

Screenshot of deployment starting

Click Open Notebook when the deployment is finished.

Screenshot of endpoint status

Run all three of the notebook code blocks in order to verify things are working. Make a note of the endpoint_name in query_endpoint. You need to add this, and the region your AWS SageMaker notebook is in to the InvokeLabeller AWS Lambda.

Screenshot query endpoint

Open InvokeLabeller’s src/app.py file and look for query_endpoint. change the endpoint_name, and client region_name to match your AWS SageMaker notebook.

1 2 3 4 5 6 def query_endpoint(img): endpoint_name = 'jumpstart-dft-image-labeller-endpoint' client = boto3.client(service_name='runtime.sagemaker', region_name='us-west-1') response = client.invoke_endpoint(EndpointName=endpoint_name, ContentType='application/x-image', Body=img) model_predictions = json.loads(response['Body'].read())['predictions'][0] return model_predictions

With SageMaker configuration complete, the next step is to deploy ImageLabeller with either Bitbucket, Github, or Gitlab.

 

Last modified on Sep 24, 2021
Cached at 1:36 AM on Oct 19, 2021 |

Additional Help