Monitoring a SageMaker endpoint using CloudWatch
Being an end-to-end service for machine learning, SageMaker is one of the main tools that we use to implement various steps of a DL project. In this section, we will describe the last missing piece: monitoring an endpoint created with SageMaker. First, we will explain how you can set up CloudWatch-based monitoring for training where metrics are reported in batches offline. Next, we will discuss how to monitor a live endpoint.
The code snippets in this section are designed to run on SageMaker Studio. Therefore, we first need to define an AWS Identity and Access Management (IAM) role and a session object. Let’s have a look at the first code snippet:
import sagemaker # IAM role of the notebook role_exec=sagemaker.get_execution_role() # a sagemaker session object sag_sess=sagemaker.session()
In the preceding code snippet, the get_execution_role
function provides the IAM role for the notebook. role_exec
. sagemaker.session...