# sagemaker

> Open source library for training and deploying models on Amazon SageMaker.

- **URL**: https://www.freshcrate.ai/projects/sagemaker
- **Author**: Amazon Web Services
- **Category**: Developer Tools
- **Latest version**: `v3.13.0` (2026-06-03)
- **License**: Unknown
- **Source**: https://github.com/aws/sagemaker-python-sdk
- **Homepage**: https://pypi.org/project/sagemaker/
- **Language**: Python
- **GitHub**: 2,239 stars, 1,248 forks
- **Registry**: pypi (`sagemaker`)
- **Tags**: `ai`, `amazon`, `aws`, `huggingface`, `ml`, `mxnet`, `pypi`, `pytorch`, `tensorflow`

## Description

.. image:: https://github.com/aws/sagemaker-python-sdk/raw/master/branding/icon/sagemaker-banner.png
    :height: 100px
    :alt: SageMaker

====================
SageMaker Python SDK
====================

.. image:: https://img.shields.io/pypi/v/sagemaker.svg
   :target: https://pypi.python.org/pypi/sagemaker
   :alt: Latest Version

.. image:: https://img.shields.io/pypi/pyversions/sagemaker.svg
   :target: https://pypi.python.org/pypi/sagemaker
   :alt: Supported Python Versions

.. image:: https://img.shields.io/badge/code_style-black-000000.svg
   :target: https://github.com/python/black
   :alt: Code style: black

.. image:: https://readthedocs.org/projects/sagemaker/badge/?version=stable
   :target: https://sagemaker.readthedocs.io/en/stable/
   :alt: Documentation Status

.. image:: https://github.com/aws/sagemaker-python-sdk/actions/workflows/codebuild-ci-health.yml/badge.svg
    :target: https://github.com/aws/sagemaker-python-sdk/actions/workflows/codebuild-ci-health.yml
    :alt: CI Health

SageMaker Python SDK is an open source library for training and deploying machine learning models on Amazon SageMaker.

With the SDK, you can train and deploy models using popular deep learning frameworks **Apache MXNet** and **PyTorch**.
You can also train and deploy models with **Amazon algorithms**,
which are scalable implementations of core machine learning algorithms that are optimized for SageMaker and GPU training.
If you have **your own algorithms** built into SageMaker compatible Docker containers, you can train and host models using these as well.

To install SageMaker Python SDK, see `Installing SageMaker Python SDK <#installing-the-sagemaker-python-sdk>`_.

❗🔥 SageMaker V3 Release
-------------------------

Version 3.0.0 represents a significant milestone in our product's evolution. This major release introduces a modernized architecture, enhanced performance, and powerful new features while maintaining our commitment to user experience and reliability.

**Important: Please review these breaking changes before upgrading.**

* Older interfaces such as Estimator, Model, Predictor and all their subclasses will not be supported in V3. 
* Please see our `V3 examples folder <https://github.com/aws/sagemaker-python-sdk/tree/master/v3-examples>`__ for example notebooks and usage patterns.


Migrating to V3
----------------

**Upgrading to 3.x**

To upgrade to the latest version of SageMaker Python SDK 3.x:

::

    pip install --upgrade sagemaker

If you prefer to downgrade to the 2.x version:

::

    pip install sagemaker==2.*

See `SageMaker V2 Examples <#sagemaker-v2-examples>`__ for V2 documentation and examples.

**Key Benefits of 3.x**

* **Modular Architecture**: Separate PyPI packages for core, training, and serving capabilities

  * `sagemaker-core <https://pypi.org/project/sagemaker-core/>`__
  * `sagemaker-train <https://pypi.org/project/sagemaker-train/>`__
  * `sagemaker-serve <https://pypi.org/project/sagemaker-serve/>`__
  * `sagemaker-mlops <https://pypi.org/project/sagemaker-mlops/>`__

* **Unified Training & Inference**: Single classes (ModelTrainer, ModelBuilder) replace multiple framework-specific classes
* **Object-Oriented API**: Structured interface with auto-generated configs aligned with AWS APIs
* **Simplified Workflows**: Reduced boilerplate and more intuitive interfaces

**Training Experience**

V3 introduces the unified ModelTrainer class to reduce complexity of initial setup and deployment for model training. This replaces the V2 Estimator class and framework-specific classes (PyTorchEstimator, SKLearnEstimator, etc.).

This example shows how to train a model using a custom training container with training data from S3.

*SageMaker Python SDK 2.x:*

.. code:: python

    from sagemaker.estimator import Estimator
    estimator = Estimator(
        image_uri="my-training-image",
        role="arn:aws:iam::123456789012:role/SageMakerRole",
        instance_count=1,
        instance_type="ml.m5.xlarge",
        output_path="s3://my-bucket/output"
    )
    estimator.fit({"training": "s3://my-bucket/train"})

*SageMaker Python SDK 3.x:*

.. code:: python

    from sagemaker.train import ModelTrainer
    from sagemaker.train.configs import InputData

    trainer = ModelTrainer(
        training_image="my-training-image",
        role="arn:aws:iam::123456789012:role/SageMakerRole"
    )

    train_data = InputData(
        channel_name="training",
        data_source="s3://my-bucket/train"
    )

    trainer.train(input_data_config=[train_data])

**See more examples:** `SageMaker V3 Examples <#sagemaker-v3-examples>`__

**Inference Experience**

V3 introduces the unified ModelBuilder class for model deployment and inference. This replaces the V2 Model class and framework-specific classes (PyTorchModel, TensorFlowModel, SKLearnModel, XGBoostModel, etc.).

This example shows how to deploy a trained model for real-time inference.

*SageMaker Python SDK 2.x:*

.. code:: python

    fro

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `v3.13.0` | 2026-06-03 | High | ### New Features  - **feat: Model customization** - Add new finetuning Trainer - MultiTurnRLTrainer(Multi-Turn Reinforcement Learning)  - **feat: Model customization** - Add new evaluator - MultiTurnRLEvaluator  - **feat: Deployment** - Add MTRL support for BedrockModelBuilder and ModelBuilder.  ### Documentation   - Add details for MTRL trainer along with other finetuning interfaces under Model customization Section - https://sagemaker.readthedocs.io/en/stable/model_customization/model_c |
| `v3.12.0` | 2026-05-20 | High | ### New Features - **SageMaker Token Generator** (#5868): Embed the `aws-sagemaker-token-generator` library into `sagemaker.core` so users can generate SageMaker bearer tokens without installing a separate wheel. Usage: `from sagemaker.core.aws_sagemaker_token_generator import provide_token` - **Feature Processor - Spark 3.5 / Python 3.12 support** (#5816): Dynamic Spark image resolution based on installed PySpark and Python versions. Supports Spark 3.1/3.2/3.3/3.5 with Python 3.9 and 3.12. Au |
| `v3.11.0` | 2026-05-13 | High | ### New Features - Auto-detect subscription recipe hyperparameters in SFTTrainer for Nova Forge datamix support - Create asymmetric ECDSA signing key in feature processor step compiler for remote function payload verification  ### Documentation - Add Feature Store reference to Implement MLOps page - Replace internal S3 URIs with user placeholders in SFT notebook |
| `v3.10.1` | 2026-05-08 | High | ## v3.10.1 (2026-05-07)  - Bug Fixes   - Fix KMS key propagation in check steps (QualityCheckStep, ClarifyCheckStep)   - Fix JumpStart network isolation in ModelBuilder   - Fix base_model_arn construction to use private hub when SAGEMAKER_HUB_NAME is set   - Fix imports for Model Customization interfaces   - Fix handling of unrecognized JumpStart container images in ModelBuilder   - Increase default timeout for training jobs |
| `v2.257.3` | 2026-05-04 | High | ### Bug Fixes * S3 bucket operations in V2 (#5803) * Improve subprocess exception handling in git_utils (#5812) * Fix v2 integ tests (#5822)  ### Other Changes * Added ISO accounts for DJI LMI (#5789) |
| `v3.9.0` | 2026-04-23 | High | ## v3.9.0 (2026-04-23)  ### New Features - **Train**: Add `wait_timeout` parameter to `train()` for SFT, DPO, RLAIF, RLVR, and BaseTrainer - **Evaluate**: Add MLflow experiment link to eval output - **JumpStart**: Allow `SAGEMAKER_HUB_NAME` environment variable to override the `HUB_NAME` constant  ### Bug Fixes - **HyperparameterTuner**: Pass through full `OutputDataConfig` from `ModelTrainer` so `kms_key_id`, `compression_type`, and other fields are preserved - **HyperparameterTuner / |
| `3.8.0` | 2026-04-21 | Low | Imported from PyPI (3.8.0) |
| `v2.257.2` | 2026-04-21 | High | ### Enhancements * Update SDK to use latest LMI v23 image for sdk v2.x (#5710) * Update SDK to use latest LMIv22 image for sdk v2.x (#5641) * Update SDK to use latest LMI image for sdk v2.x (#5617)  ### Bug Fixes * Security fixes for Triton HMAC key exposure and missing integrity check (v2) (#5656) * Include jumpstart/region_config.json in MANIFEST.in (#5605) * Apply default experiment config for pipelines only in regions with SageMaker Experiments (#5570)  ### Other Changes * Remove |
| `v3.8.0` | 2026-04-16 | High | ## v3.8.0 (2026-04-16)  ### - New Feature    - Feature Group Manager    - Image Upgrades   - Remove Pytorch hard dependency - Bug Fixes:    - Add MLFLowConfig to Base Model   - Support for docker compose > v2    - Improve SDK v3 Hugging Face support |
| `v3.7.1` | 2026-04-01 | Medium | ### Features - **Telemetry**: Added telemetry emitter to `ScriptProcessor` and `FrameworkProcessor`, enabling SDK usage tracking for processing jobs via the telemetry attribution module (new `PROCESSING` feature enum added to telemetry constants)  ### Fixes - **ModelBuilder**: Fixed `accept_eula` handling in ModelBuilder's LoRA deployment path — previously hardcoded to `True`, now respects the user-provided value and raises a `ValueError` if not explicitly set to `True` - **Evaluate**: Fixe |

## Citation

- HTML: https://www.freshcrate.ai/projects/sagemaker
- Markdown: https://www.freshcrate.ai/projects/sagemaker.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/sagemaker/deps

_Generated by freshcrate.ai. Indexes pypi releases for AI-agent ecosystem packages._
