Reader small image

You're reading from  Machine Learning Engineering on AWS

Product typeBook
Published inOct 2022
PublisherPackt
ISBN-139781803247595
Edition1st Edition
Tools
Right arrow
Author (1)
Joshua Arvin Lat
Joshua Arvin Lat
author image
Joshua Arvin Lat

Joshua Arvin Lat is the Chief Technology Officer (CTO) of NuWorks Interactive Labs, Inc. He previously served as the CTO for three Australian-owned companies and as director of software development and engineering for multiple e-commerce start-ups in the past. Years ago, he and his team won first place in a global cybersecurity competition with their published research paper. He is also an AWS Machine Learning Hero and has shared his knowledge at several international conferences, discussing practical strategies on machine learning, engineering, security, and management.
Read more about Joshua Arvin Lat

Right arrow

Preparing the SageMaker script mode prerequisites

In this chapter, we will be preparing a custom script to use a pre-trained model for predictions. Before we can proceed with using the SageMaker Python SDK to deploy our pre-trained model to an inference endpoint, we’ll need to ensure that all the script mode prerequisites are ready.

Figure 7.4 – The desired file and folder structure

In Figure 7.4, we can see that there are three prerequisites we’ll need to prepare:

  • inference.py
  • requirements.txt
  • setup.py

We will store these prerequisites inside the scripts directory. We’ll discuss these prerequisites in detail in the succeeding pages of this chapter. Without further ado, let’s start by preparing the inference.py script file!

Preparing the inference.py file

In this section, we will prepare a custom Python script that will be used by SageMaker when processing inference requests. Here, we can influence...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Machine Learning Engineering on AWS
Published in: Oct 2022Publisher: PacktISBN-13: 9781803247595

Author (1)

author image
Joshua Arvin Lat

Joshua Arvin Lat is the Chief Technology Officer (CTO) of NuWorks Interactive Labs, Inc. He previously served as the CTO for three Australian-owned companies and as director of software development and engineering for multiple e-commerce start-ups in the past. Years ago, he and his team won first place in a global cybersecurity competition with their published research paper. He is also an AWS Machine Learning Hero and has shared his knowledge at several international conferences, discussing practical strategies on machine learning, engineering, security, and management.
Read more about Joshua Arvin Lat