Adapting your training script to register a hook
Note
After careful consideration, we have made the decision to close new customer access to Amazon Sagemaker Debugger, effective 7/30/26. Existing customers can continue to use the service as normal. AWS continues to invest in security and availability improvements for Debugger, but we do not plan to introduce new features. For more information, see Debugger availability change.
Amazon SageMaker Debugger comes with a client library called the sagemaker-debugger Python SDKsagemaker-debugger Python SDK provides tools for adapting your training
script before training and analysis tools after training. In this page, you'll learn how to
adapt your training script using the client library.
The sagemaker-debugger Python SDK provides wrapper functions that help
register a hook to extract model tensors, without altering your training script. To get
started with collecting model output tensors and debug them to find training issues, make
the following modifications in your training script.
Tip
While you're following this page, use the sagemaker-debugger open source SDK documentation