# aws/amazon-sagemaker-examples

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/aws-amazon-sagemaker-examples).**

10,958 stars · 6,971 forks · Jupyter Notebook · Apache-2.0

## Links

- GitHub: https://github.com/aws/amazon-sagemaker-examples
- Homepage: https://sagemaker-examples.readthedocs.io
- awesome-repositories: https://awesome-repositories.com/repository/aws-amazon-sagemaker-examples.md

## Topics

`aws` `data-science` `deep-learning` `examples` `inference` `jupyter-notebook` `machine-learning` `mlops` `reinforcement-learning` `sagemaker` `training`

## Description

This repository is a collection of Jupyter notebooks providing reference implementations and templates for building, training, and deploying machine learning models using Amazon SageMaker. It serves as an example library for implementing model architectures and automating the machine learning lifecycle.

The library provides practical patterns for machine learning training, data engineering, and model deployment. It includes implementation guides for MLOps, including workflows for model monitoring, lineage tracking, and hyperparameter tuning.

The examples cover a broad range of capabilities including automated model selection, large language model fine-tuning, and reinforcement learning. It also demonstrates data engineering tasks such as dataset labeling and feature store management, as well as inference strategies like real-time endpoints and batch transform jobs.

These examples are delivered as interactive notebooks designed for exploratory data analysis and iterative workflow development.

## Tags

### Artificial Intelligence & ML

- [Machine Learning Training](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/machine-learning-training.md) — Provides reference implementations for building and optimizing predictive models using custom containers and built-in algorithms.
- [SageMaker Example Libraries](https://awesome-repositories.com/f/artificial-intelligence-ml/sagemaker-example-libraries.md) — Provides a comprehensive collection of Jupyter notebooks for implementing machine learning workflows using Amazon SageMaker.
- [Deep Learning Frameworks](https://awesome-repositories.com/f/artificial-intelligence-ml/deep-learning-frameworks.md) — Implements model training and hosting using pre-built containers for popular deep learning libraries. ([source](https://cdn.jsdelivr.net/gh/aws/amazon-sagemaker-examples@default/README.md))
- [Large Language Model Fine-Tuning](https://awesome-repositories.com/f/artificial-intelligence-ml/large-language-model-fine-tuning.md) — Demonstrates adapting pre-trained large language models to custom datasets using parameter-efficient fine-tuning. ([source](https://sagemaker-examples.readthedocs.io))
- [Hyperparameter Tuning](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-optimization-and-inference/training-algorithms/machine-learning-optimization/hyperparameter-tuning.md) — Provides workflows for iterative hyperparameter tuning to optimize prediction performance. ([source](https://sagemaker-examples.readthedocs.io))
- [Training and Evaluation Pipelines](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-training-and-tuning/training-frameworks/training-and-evaluation-pipelines.md) — Implements reproducible pipelines that chain data preparation, model training, and evaluation stages.
- [Hyperparameter Optimization](https://awesome-repositories.com/f/artificial-intelligence-ml/model-optimization/training-efficiency/hyperparameter-optimization.md) — Implements automated methods for searching and selecting the best configuration parameters for models. ([source](https://cdn.jsdelivr.net/gh/aws/amazon-sagemaker-examples@default/README.md))
- [Model Serving Endpoints](https://awesome-repositories.com/f/artificial-intelligence-ml/model-serving-endpoints.md) — Implements the hosting of trained models behind persistent REST APIs for real-time, low-latency predictions.
- [Automated Model Training](https://awesome-repositories.com/f/artificial-intelligence-ml/automated-model-training.md) — Provides examples of using AutoML to automatically select algorithms and tune hyperparameters. ([source](https://sagemaker-examples.readthedocs.io/autopilot/index.html))
- [Model Lineage Trackers](https://awesome-repositories.com/f/artificial-intelligence-ml/data-lineage/model-lineage-trackers.md) — Provides implementation patterns for tracking the provenance of predictions by recording relationships between datasets and training jobs.
- [Spark Integrations](https://awesome-repositories.com/f/artificial-intelligence-ml/distributed-deep-learning/spark-integrations.md) — Integrates Apache Spark pipeline stages with machine learning workflows to synchronize data engineering and training. ([source](https://cdn.jsdelivr.net/gh/aws/amazon-sagemaker-examples@default/README.md))
- [Experiment Tracking](https://awesome-repositories.com/f/artificial-intelligence-ml/experiment-tracking.md) — Organizes training jobs, models, and endpoints into projects to track relationships and compare results. ([source](https://cdn.jsdelivr.net/gh/aws/amazon-sagemaker-examples@default/README.md))
- [Dataset Batch Inference](https://awesome-repositories.com/f/artificial-intelligence-ml/facial-landmark-detection/batch-image-processing/batch-inference-pipelines/dataset-batch-inference.md) — Processes an entire dataset through a model in a single job to generate large-scale predictions. ([source](https://sagemaker-examples.readthedocs.io/intro.html))
- [Feature Stores](https://awesome-repositories.com/f/artificial-intelligence-ml/feature-stores.md) — Demonstrates the storage and retrieval of curated features for reuse across multiple machine learning models. ([source](https://sagemaker-examples.readthedocs.io))
- [Inference Optimization and Tuning](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-deployment-and-serving/inference-optimization-and-tuning.md) — Improves inference speed and accuracy by combining hardware-specific compilation and hyperparameter tuning.
- [Model Evaluation Metrics](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-evaluation-and-validation/model-evaluation-metrics.md) — Computes accuracy, precision, and recall metrics to assess the performance of trained models. ([source](https://sagemaker-examples.readthedocs.io/introduction_to_applying_machine_learning/xgboost_customer_churn/xgboost_customer_churn_outputs.html))
- [Training Algorithms](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-optimization-and-inference/training-algorithms.md) — Implements training using pre-configured, built-in algorithms for common machine learning tasks. ([source](https://cdn.jsdelivr.net/gh/aws/amazon-sagemaker-examples@default/README.md))
- [Fine-tuned Model Deployment](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-training-and-tuning/fine-tuning-and-customization/model-fine-tuning/fine-tuned-model-deployment.md) — Hosts fine-tuned large language models for real-time inference using specialized containers. ([source](https://sagemaker-examples.readthedocs.io/introduction_to_applying_machine_learning/mixtral_tune_and_deploy/mixtral-8x7b.html))
- [Containerized Training](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-training-and-tuning/training-frameworks/model-training-frameworks/containerized-training.md) — Provides templates for packaging custom ML algorithms into Docker containers for managed training. ([source](https://cdn.jsdelivr.net/gh/aws/amazon-sagemaker-examples@default/README.md))
- [Distributed Training Loops](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-training-and-tuning/training-frameworks/model-training-pipelines/model-parallelism/distributed-training-loops.md) — Provides implementations for building and optimizing models using distributed training across multiple devices. ([source](https://cdn.jsdelivr.net/gh/aws/amazon-sagemaker-examples@default/README.md))
- [Annotation Dataset Creation](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/machine-learning-datasets/annotation-dataset-creation.md) — Provides guides for creating and managing labeling jobs to annotate datasets using human review and active learning. ([source](https://cdn.jsdelivr.net/gh/aws/amazon-sagemaker-examples@default/README.md))
- [Hardware-Aware Compilers](https://awesome-repositories.com/f/artificial-intelligence-ml/model-compilation-optimizers/hardware-aware-compilers.md) — Shows how to optimize deep learning models for specific target hardware to reduce memory and increase speed.
- [Model Explainability](https://awesome-repositories.com/f/artificial-intelligence-ml/model-predictions/model-explainability.md) — Measures feature contributions to model outputs to ensure transparency and identify prediction bias. ([source](https://sagemaker-examples.readthedocs.io))
- [Model Performance Selection](https://awesome-repositories.com/f/artificial-intelligence-ml/model-selection-tools/automated-selection/model-performance-selection.md) — Uses automated machine learning to handle feature selection and model generation based on dataset characteristics. ([source](https://sagemaker-examples.readthedocs.io))
- [Model Training Packaging](https://awesome-repositories.com/f/artificial-intelligence-ml/model-training-packaging.md) — Demonstrates how to package and import external training logic and pre-trained models into managed environments. ([source](https://cdn.jsdelivr.net/gh/aws/amazon-sagemaker-examples@default/README.md))
- [Reinforcement Learning](https://awesome-repositories.com/f/artificial-intelligence-ml/reinforcement-learning.md) — Provides examples for training agents to make sequential decisions through interaction with simulated environments.
- [Reinforcement Learning Training](https://awesome-repositories.com/f/artificial-intelligence-ml/reinforcement-learning-training.md) — Implements reinforcement learning frameworks to train agents that solve complex problems via iterative feedback. ([source](https://cdn.jsdelivr.net/gh/aws/amazon-sagemaker-examples@default/README.md))
- [Training Dataset Processing](https://awesome-repositories.com/f/artificial-intelligence-ml/training-dataset-processing.md) — Transforms and cleans large datasets using distributed computing tools to prepare high-quality features for training. ([source](https://cdn.jsdelivr.net/gh/aws/amazon-sagemaker-examples@default/README.md))
- [Training Script Generators](https://awesome-repositories.com/f/artificial-intelligence-ml/training-script-generators.md) — Shows how to execute user-provided training scripts with automatic data loading and checkpointing. ([source](https://sagemaker-examples.readthedocs.io/advanced_functionality/index.html))

### Data & Databases

- [ML Data Preparation](https://awesome-repositories.com/f/data-databases/ml-data-preparation.md) — Implements cleaning, labeling, and feature store creation to prepare high-quality data for model training.
- [Data Engineering Templates](https://awesome-repositories.com/f/data-databases/ml-feature-stores/data-engineering-templates.md) — Provides guides for cleaning, labeling, and transforming large datasets and managing feature stores.
- [Data Processing](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/data-processing.md) — Executes data preprocessing and feature transformation workloads using standard data science frameworks. ([source](https://cdn.jsdelivr.net/gh/aws/amazon-sagemaker-examples@default/README.md))
- [Distributed Data Processing](https://awesome-repositories.com/f/data-databases/distributed-data-processing.md) — Runs distributed preprocessing and feature transformation workloads using containerized tools to prepare large datasets. ([source](https://cdn.jsdelivr.net/gh/aws/amazon-sagemaker-examples@default/README.md))

### DevOps & Infrastructure

- [MLOps Pipeline Automation](https://awesome-repositories.com/f/devops-infrastructure/cicd-pipeline-automation/cicd-pipeline-management/automation-workflows/mlops-pipeline-automation.md) — Orchestrates the end-to-end ML lifecycle from data processing to model monitoring and lineage tracking.
- [Model Endpoint Deployment](https://awesome-repositories.com/f/devops-infrastructure/cloud-deployment/model-endpoint-deployment.md) — Hosts trained models as persistent REST endpoints for real-time requests or via large-scale batch transform jobs.
- [ML Model Hosting](https://awesome-repositories.com/f/devops-infrastructure/ml-model-hosting.md) — Demonstrates practical patterns for hosting real-time REST endpoints and running large-scale batch transform jobs.
- [Model Serving Endpoints](https://awesome-repositories.com/f/devops-infrastructure/model-serving-endpoints.md) — Hosts trained models behind persistent endpoints to return low-latency predictions via REST API. ([source](https://sagemaker-examples.readthedocs.io/intro.html))
- [Managed Training Environments](https://awesome-repositories.com/f/devops-infrastructure/cloud-infrastructure-management/gpu-training-clusters/managed-training-environments.md) — Utilizes managed compute clusters with automatic scaling to run machine learning training jobs. ([source](https://sagemaker-examples.readthedocs.io/intro.html))
- [Compute Orchestration Engines](https://awesome-repositories.com/f/devops-infrastructure/cloud-infrastructure/cloud-computing-serverless/cloud-orchestration-automation/compute-orchestration-engines.md) — Demonstrates the allocation and scaling of virtualized infrastructure to run training and processing jobs automatically.
- [Model-to-Image Packaging](https://awesome-repositories.com/f/devops-infrastructure/container-orchestration/image-management-tools/container-image-distribution/model-to-image-packaging.md) — Demonstrates how to package training algorithms and inference code into portable container images for consistent execution.
- [Custom Container Images](https://awesome-repositories.com/f/devops-infrastructure/container-orchestration/image-management-tools/custom-container-images.md) — Hosts pre-trained models or custom algorithms in production endpoints using custom Docker containers. ([source](https://cdn.jsdelivr.net/gh/aws/amazon-sagemaker-examples@default/README.md))
- [ML Lifecycle Orchestration](https://awesome-repositories.com/f/devops-infrastructure/kubernetes-deployments/kubernetes-application-deployments/kubernetes-job-orchestration/ml-lifecycle-orchestration.md) — Automates the machine learning lifecycle by chaining processing and evaluation steps into reproducible pipelines. ([source](https://sagemaker-examples.readthedocs.io))

### Development Tools & Productivity

- [Interactive Notebook Environments](https://awesome-repositories.com/f/development-tools-productivity/interactive-notebook-environments.md) — Utilizes pre-configured notebook instances for exploratory data analysis and iterative workflow development. ([source](https://sagemaker-examples.readthedocs.io))

### Education & Learning Resources

- [MLOps Guides](https://awesome-repositories.com/f/education-learning-resources/model-training-guides/mlops-guides.md) — Provides reference workflows for automating the machine learning lifecycle, including monitoring and lineage tracking.

### System Administration & Monitoring

- [Model Performance Monitoring](https://awesome-repositories.com/f/system-administration-monitoring/monitoring-and-observability/observability-platforms/metric-performance-monitors/model-performance-monitoring.md) — Tracks model drift and analyzes data bias in production to maintain long-term accuracy. ([source](https://sagemaker-examples.readthedocs.io))
