amazon-sagemaker-examples

Example 📓 Jupyter notebooks that demonstrate how to build, train, and deploy machine learning models using 🧠 Amazon SageMaker.

What is amazon-sagemaker-examples?

Example 📓 Jupyter notebooks that demonstrate how to build, train, and deploy machine learning models using 🧠 Amazon SageMaker.

Overview of amazon-sagemaker-examples

What it is

This repository contains example Jupyter notebooks that demonstrate how to build, train, and deploy machine learning models using Amazon SageMaker. The README also announces SageMaker-Core, a new Python SDK that provides an object-oriented interface for SageMaker resources. The notebooks are organized by ML capability and are self-contained.

Key features

  • Notebooks organized by ML capability: Training, Model Customization, Evaluation, Inference, and MLOps.
  • Training examples cover script and framework training, distributed training, managed spot training, heterogeneous clusters, bringing your own container, AWS Batch training queues, and local code as a training job with @remote.
  • Model customization examples include supervised fine-tuning (SFT), direct preference optimization (DPO), reinforcement learning with verifiable rewards (RLVR), RL from AI feedback (RLAIF), multi-turn RL (MTRL), continued pre-training (CPT), recipe overrides, data mixing, JumpStart fine-tuning, and distributed fine-tuning.
  • Evaluation examples use SageMaker evaluator for standard benchmarks, custom scoring functions, LLM-as-judge, and Inspect AI.
  • Inference examples cover real-time, serverless, and asynchronous endpoints; inference pipelines; multi-model and multi-container endpoints; A/B testing, shadow variants, deployment guardrails; autoscaling; latency and cost optimization; batch transform; deployment to Amazon Bedrock; AWS Marketplace model packages; and human review with Augmented AI.
  • MLOps examples include SageMaker Pipelines with Model Registry, lineage tracking, experiment tracking, Feature Store, processing jobs, EMR Serverless steps, bias and explainability analysis with Clarify, and MLflow.
  • The repository is maintained by the Amazon SageMaker team and only accepts notebooks demonstrating features not yet covered.

Use cases

  • ML practitioners who want to learn how to use Amazon SageMaker features through practical examples.
  • Developers seeking to customize AWS primitives for ML workloads using SageMaker-Core.
  • Teams looking for reference implementations for training, customization, evaluation, deployment, and MLOps.

Getting started

To run the example notebooks, you need an AWS account, proper IAM User and Role setup, an Amazon SageMaker Notebook Instance, and an S3 bucket. The notebooks are automatically loaded into SageMaker Notebook Instances and can be accessed from the SageMaker Examples tab in Jupyter or the SageMaker logo in JupyterLab. For detailed setup instructions, see the repository README.

License and pricing

This library is licensed under the Apache 2.0 License. It is open source and free to use.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/awsamazon-sagemaker-examples.svg)](https://yunodb.com/tools/awsamazon-sagemaker-examples?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/awsamazon-sagemaker-examples?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/awsamazon-sagemaker-examples.svg" alt="Featured on YunoDB" height="20"></a>