Using the SageMaker SDK to automate the ML experiment
In Chapter 1, Getting Started with Automated Machine Learning on AWS, you were provided with sample code to walk through the manual and iterative ML process. Since SageMaker is an AWS web service, we can also use code to interact with its various modules using the Python SDK for AWS, or boto3. More importantly, AWS also provides a dedicated Python SDK for SageMaker, called the SageMaker SDK.
In essence, the SageMaker SDK is a higher-level SDK that uses the underlying boto3 SDK with a focus on ML experimentation. For example, to deploy a model as a SageMaker hosted endpoint, an ML practitioner would have to use three different boto3 calls:
- The ML practitioner must instantiate a trained model using the output artifact from a SageMaker training job. This is accomplished using the
create_model()
method from boto3's low-level SageMaker client,boto3.client("sagemaker")
. - Next, the ML practitioner must create...