Bring your own model with Amazon SageMaker AI: Script mode in SDK v3
Machine Learning Blog
This article demonstrates how to use Amazon SageMaker Python SDK v3's script mode for training and deploying custom models with decoupled code and containers.
- ModelTrainer and ModelBuilder replace framework-specific classes (SKLearn, PyTorch, XGBoost) with unified APIs
- SourceCode object syncs local code directories into containers at runtime without rebuilding images
- Example 1: Train scikit-learn Random Forest on diabetes dataset and deploy via DJL Serving
- Example 2: Fine-tune Stable Diffusion 3.5 with LoRA using multi-GPU distributed training on ml.g5.12xlarge
- Supports recipe-driven hyperparameters, AWS Secrets Manager integration, and input data channels
- Same API works for tabular ML, generative AI, and distributed training workflows
SDK v3 streamlines ML workflows by decoupling training code from container images, enabling faster iteration and consistent interfaces across diverse model types and scales.
The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.
Related articles
Aug 3
2026
2026
Amazon SageMaker AI serverless model customization now supports full fine-tuning
Dec 3
2025
2025
New serverless model customization capability in Amazon SageMaker AI
Aug 10
2026
2026
Run interactive IDEs on Amazon EKS with SageMaker AI to power up your AI workflows
Jun 30
2026
2026
Amazon SageMaker AI now supports serverless model customization for Gemma 4 models
The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.