NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #882 most downloaded on PyPI
Open source library for training and deploying models on Amazon SageMaker.
Last release 10 days ago
24 Sep 2026
Ships on a steady schedule
a new release about every 2 weeks
Nearly every release is documented
notes for 59 of the last 60 stable releases
3 versions withdrawn
withdrawn after publishing
9 years old
692 releases · first in 2017
feat(pipeline): add inference and lineage step types
sagemaker 3.23.0sagemaker-core 2.23.0sagemaker-train 1.23.0sagemaker-serve 1.23.0sagemaker-mlops 1.23.0One column per quarter.
fix(jumpstart): name JumpStart in the content bucket error
Packages:
sagemaker-core 2.22.1sagemaker-train 1.22.1sagemaker-serve 1.22.1sagemaker-mlops 1.22.1sagemaker 3.22.1Added Instance Preferences for multi-instance-type training and processing, including resolved selected-instance fields.
UpdateRecord and Standard_V2 storage support.list_hyperparameters().sagemaker-core==2.22.0sagemaker-train==1.22.0sagemaker-serve==1.22.0sagemaker-mlops==1.22.0sagemaker==3.22.0sagemaker-core now requires boto3>=1.43.90,<2.0.0, ensuring botocore includes the public InstancePreferences API model.list_hyperparameters() for pre-trainer hyperparameter discovery (#6149)v prefix (#6231)training_plan_arn during serverful compute reconstruction (#6258)55c2a9bd)feat(train): Add inherited list_supported_models to BaseTrainer
fix(serve): pre-deploy JumpStart benchmark data + public HuggingFace …
fix(serve): pre-deploy JumpStart benchmark data + public HuggingFace …
…download helper (#6175)
Fixes ModelBuilder benchmark APIs for pre-deploy JumpStart models and adds a
public HuggingFace-Hub download helper:
- benchmark_metrics: display_benchmark_metrics() read self.benchmark_metrics, a
property that existed in v2 but was dropped in the v3 port, so it raised
AttributeError. Restore the property (a pandas DataFrame built from the
model's published deployment-config benchmark data).
- list_deployment_configs(): with no instance_type it called
_get_deployment_configs() before the JumpStart metadata configs were loaded,
so a pre-deploy builder (_metadata_configs=None) got []. _get_deployment_configs
now calls _ensure_metadata_configs() itself, so every caller lazily loads them.
- ragged benchmark data: get_metrics_from_deployment_configs built columns
independently, appending the instance-rate (pricing) column only for
instances that had it. That produced unequal-length columns (crashing
pd.DataFrame with "All arrays must be of the same length") AND misaligned the
present rate values onto the wrong rows. Assemble one record per row and pivot
to columns at the end, padding unset cells with None, so columns stay equal
length and every value stays on its own row. Column layout is unchanged (the
rate column still comes last).
- download_huggingface_model(): new public helper in serve.utils.hf_utils,
exported from sagemaker.serve. Downloads a Hub snapshot and optionally uploads
it to S3, so notebooks no longer hand-roll snapshot_download + S3Uploader.
Supports revision / allow_patterns / ignore_patterns passthroughs; when
staging to S3 without a caller-supplied local_dir it uses a temporary
directory that is removed after the upload. migration.md documents both new
surfaces.
Unit: 11 new tests (benchmark/config, ragged-metrics alignment/order, HF helper
incl. temp-dir cleanup and passthroughs).
feat(train): Add SequenceLength support for SFT, DPO, RLVR, RLAIF trainers
additional_model_data_sources for JumpStart models (#6151)get_jumpstart_configs (#6137)model_path dir before using it as download dir (#6147)Modular release of the SageMaker Python SDK v3 ( pip install sagemaker ): sagemaker-core 2.18.0 · sagemaker-train 1.18.0 · sagemaker-serve 1.18.0 · sa
Modular release of the SageMaker Python SDK v3 (pip install sagemaker):
sagemaker-core 2.18.0 · sagemaker-train 1.18.0 · sagemaker-serve 1.18.0 ·
sagemaker-mlops 1.18.0 · sagemaker (meta) 3.18.0
sagemaker control-plane client (#6107)SageMakerClient singleton pinning (#6120)TransformJob in transform() (#6110)agent_run_time inference from the attached input trainer (#6115)BenchmarkResult sweep-aware for concurrency search runs (#6098)source_code for image_uri / ModelTrainer builds (#6112)DatasetBuilder (feature-store) (#6014)torch in sagemaker-train test data (#5432, #5328)black 24.3.0 → 26.3.1 in /requirements/tox (#6119)after_n_builds so single-submodule PRs report coverage (#6056)Full changelog:
v3.17.0...v3.18.0
Modular release of the SageMaker Python SDK v3 (pip install sagemaker): sagemaker-core 2.17.0 · sagemaker-train 1.17.0 · sagemaker-serve 1.17.0 · sage
Modular release of the SageMaker Python SDK v3 (pip install sagemaker):
sagemaker-core 2.17.0 · sagemaker-train 1.17.0 · sagemaker-serve 1.17.0 ·
sagemaker-mlops 1.17.0 · sagemaker (meta) 3.17.0
source_dir in FrameworkProcessor (#6047)ModelTrainer intelligent defaults (#6064)HostingEulaUri field (#6077)BatchWriteRecord and ListRecords into ingest_dataframe (#6026)iam:SimulatePrincipalPolicy throttling across suites (#6081)Full changelog: https://github.com/aws/sagemaker-python-sdk/compare/v3.16.0...v3.17.0
feat: actionable guidance for removed v2 interfaces
feat: Add granular telemetry signals decorator params and error classification
Release: v3.15.0 (2026-06-22) Packages: sagemaker 3.15.0 · sagemaker-core 2.15.0 · sagemaker-train 1.15.0 · sagemaker-serve 1.15.0 · sagemaker-mlops 1
Release: v3.15.0 (2026-06-22)
Packages: sagemaker 3.15.0 · sagemaker-core 2.15.0 · sagemaker-train 1.15.0 · sagemaker-serve 1.15.0 · sagemaker-mlops 1.15.0
This release converges the standalone Nova Forge SDK into the SageMaker Python SDK, making Nova model customization (training, evaluation, deployment) first-class under the sagemaker.* namespace.
get_resolved_recipe() (#2034)is_multimodal utils function (multimodal data auto-detection) (#2033)model_package_group validation when HyperPod compute is provided in CPTTrainer (#2068)Full Changelog: https://github.com/aws/sagemaker-python-sdk/compare/v3.14.0...v3.15.0
get_resolved_recipe()is_multimodal utils function (multimodal data auto-detection)model_package_group validation when HyperPod compute is provided in CPTTrainerchore: deprecate Python 3.9 support by @mollyheamazon in https://github.com/aws/sagemaker-python-sdk/pull/5941
Full Changelog: https://github.com/aws/sagemaker-python-sdk/compare/v3.13.1...v3.14.0
feat: add import job polling and provisioned throughput for Bedrock OSS deployments
feat: Model customization - Add new finetuning Trainer - MultiTurnRLTrainer(Multi-Turn Reinforcement Learning)
serve: Prevent code injection in capture_dependencies path interpolation (#5792): Security fix — use repr() escaping to prevent code injection via cra…
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_tokensagemaker-feature-store-pyspark for Spark remote jobs.vpc_config AttributeError and telemetry region fallback (#5839): Fix AttributeError on vpc_config in networking and telemetry region fallback for classmethods.CustomAttributes field to DefaultPayloadsModel.serialize() output (#5860): Fix bug where False, 0, and "" were silently dropped by serialize() due to truthy check. This caused issues like optimize_model=False being sent as True.capture_dependencies path interpolation (#5792): Security fix — use repr() escaping to prevent code injection via crafted directory names in ModelBuilder with dependencies={"auto": True}. (CWE-94, P414309851)VolumeSizeInGB not being passed through when deploying models with inference_volume_size from JumpStart config.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_tokenuse_lake_formation_credentials parameter to the @feature_processor decorator, enabling Lake Formation credential vending when set to True.sagemaker-feature-store-pyspark for Spark remote jobs.ConfigUploader for function payload signature verification.IcebergProperties to the feature_store public API surface.vpc_config AttributeError and telemetry region fallback (#5839): Fix AttributeError on vpc_config in networking and telemetry region fallback for classmethods.CustomAttributes field to DefaultPayloadsModel.serialize() output (#5860): Fix bug where False, 0, and "" were silently dropped by serialize() due to truthy check. This caused issues like optimize_model=False being sent as True.capture_dependencies path interpolation (#5792): Security fix — use repr() escaping to prevent code injection via crafted directory names in ModelBuilder with dependencies={"auto": True}. (CWE-94, P414309851)VolumeSizeInGB not being passed through when deploying models with inference_volume_size from JumpStart config.Auto-detect subscription recipe hyperparameters in SFTTrainer for Nova Forge datamix support
Fix KMS key propagation in check steps (QualityCheckStep, ClarifyCheckStep)
Make _PipelineExecution a public class
_PipelineExecution a public classrequirements.txt installationcode_location into code upload pathsgit_utilsservice-2.json with latest public botocore service modelAdd wait_timeout parameter to train()
wait_timeout parameter to train()SAGEMAKER_HUB_NAME env var override for HUB_NAME constantHyperparameterTunerModelBuilder overwriting user-provided HF_MODEL_ID for DJL ServingModelBuilder with source_code + DJL LMI: /opt/ml/model becomes read-onlyModelTrainer and HyperparameterTuner missing environment variableswait_timeout parameter to train() for SFT, DPO, RLAIF, RLVR, and BaseTrainerSAGEMAKER_HUB_NAME environment variable to override the HUB_NAME constantOutputDataConfig from ModelTrainer so kms_key_id, compression_type, and other fields are preservedHF_MODEL_ID for DJL Serving/opt/ml/model writable when using source_code with DJL LMINone hyperparameters in to_dict instead of converting them to the string "None"us-west-2 to Nova supported regionsSupport for docker compose > v2
Telemetry: Added telemetry emitter to ScriptProcessor and FrameworkProcessor, enabling SDK usage tracking for processing jobs via the telemetry attrib
ScriptProcessor and FrameworkProcessor, enabling SDK usage tracking for processing jobs via the telemetry attribution module (new PROCESSING feature enum added to telemetry constants)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 Truelambda_function.lambda_handler instead of deriving it from the source filename, which caused invocation failures when the source file had a non-default nameFull Changelog: https://github.com/aws/sagemaker-python-sdk/compare/v3.7.0...v3.7.1
ModelBuilder: Sync Nova hosting configs with AGISageMakerInference
HyperparameterTuner: Include sm_drivers channel in HyperparameterTuner jobs
Feature Store v3: New version of Feature Store functionality
Pipelines: Correct Tag class usage in pipeline creation
feat: add emr-serverless step for SageMaker Pipelines
aws_batch bug fix - remove experiment config parameter as it Estimator is deprecated.
AWS_Batch: queueing of training jobs with ModelTrainer
Evaluator handshake with trainer
Add validation to bedrock reward models
model_package_group_name param to model_package_group in finetuning interfacesdataset param for benchmark evaluatorWe’re excited to introduce comprehensive model fine-tuning capabilities in the SageMaker Python SDK V3, bringing state-of-the-art fine-tuning techniqu
We’re excited to introduce comprehensive model fine-tuning capabilities in the SageMaker Python SDK V3, bringing state-of-the-art fine-tuning techniques to production ML workflows. Fine-tune foundation models with enterprise features including automated experiment tracking, serverless infrastructure, and integrated evaluation—all with just a few lines of code.
The SageMaker Python SDK V3 now includes four specialized Fine-Tuning Trainers for different fine-tuning techniques. Each trainer is optimized for specific use cases, following established research and industry best practices:
Fine-tune models with labeled instruction-response pairs for task-specific adaptation.
from sagemaker.train import SFTTrainer
from sagemaker.train.common import TrainingType
trainer = SFTTrainer(
model="meta-llama/Llama-2-7b-hf",
training_type=TrainingType.LORA,
model_package_group_name="my-fine-tuned-models",
training_dataset="s3://bucket/train.jsonl"
)
training_job = trainer.train()
Align models with human preferences using the DPO algorithm. Unlike traditional RLHF, DPO eliminates the need for a separate reward model, simplifying the alignment pipeline while achieving comparable results. Use cases : Preference alignment, safety tuning, style adaptation.
from sagemaker.train import DPOTrainer
trainer = DPOTrainer(
model="meta-llama/Llama-2-7b-hf",
training_type=TrainingType.LORA,
model_package_group_name="my-dpo-models",
training_dataset="s3://bucket/preference_data.jsonl"
)
training_job = trainer.train()
Leverage AI-generated feedback as reward signals using Amazon Bedrock models. RLAIF offers a scalable alternative to human feedback while maintaining quality.
from sagemaker.train import RLAIFTrainer
trainer = RLAIFTrainer(
model="meta-llama/Llama-2-7b-hf",
training_type=TrainingType.LORA,
model_package_group_name="my-rlaif-models",
reward_model_id="anthropic.claude-3-5-haiku-20241022-v1:0",
reward_prompt="Builtin.Helpfulness",
training_dataset="s3://bucket/rlaif_data.jsonl"
)
training_job = trainer.train()
Train with custom, programmatic reward functions for domain-specific optimization.
from sagemaker.train import RLVRTrainer
trainer = RLVRTrainer(
model="meta-llama/Llama-2-7b-hf",
training_type=TrainingType.LORA,
model_package_group_name="my-rlvr-models",
custom_reward_function="arn:aws:sagemaker:region:account:hub-content/.../evaluator/1.0",
training_dataset="s3://bucket/rlvr_data.jsonl"
)
training_job = trainer.train()
Parameter-Efficient Fine-Tuning
Automatic experiment tracking with intelligent defaults:
Discover and customize training hyperparameters with built-in validation:
# View available hyperparameters
trainer.hyperparameters.get_info()
# Customize training
trainer.hyperparameters.learning_rate = 0.0001
trainer.hyperparameters.max_epochs = 3
trainer.hyperparameters.lora_alpha = 32
Build on previously fine-tuned models for iterative improvement:
from sagemaker.core.resources import ModelPackage
# Use a previously fine-tuned model
base_model = ModelPackage.get(
model_package_name="arn:aws:sagemaker:region:account:model-package/..."
)
trainer = SFTTrainer(
model=base_model, # Continue from fine-tuned model
training_type=TrainingType.LORA,
model_package_group_name="my-models-v2"
)
Multiple input formats with automatic validation:
No infrastructure management required—just specify your model and data:
Production-ready security features:
Comprehensive evaluation framework with three evaluator types:
See the "Evaluating Fine-Tuned Models" section below for detailed examples.
Evaluate your fine-tuned models using standard benchmarks, custom metrics, or LLM-based evaluation.
Evaluate against 11 standard benchmarks including MMLU, BBH, GPQA, MATH, and more.
from sagemaker.train.evaluate import BenchMarkEvaluator, get_benchmarks, get_benchmark_properties
Benchmark = get_benchmarks()
print(list(Benchmark))
# [MMLU, MMLU_PRO, BBH, GPQA, MATH, STRONG_REJECT, IFEVAL, GEN_QA, MMMU, LLM_JUDGE, INFERENCE_ONLY]
Get benchmark details
props = get_benchmark_properties(Benchmark.MMLU)
print(props['description'])
print(props['subtasks'])
evaluator = BenchMarkEvaluator(
benchmark=Benchmark.MMLU,
model_package_arn="arn:aws:sagemaker:...",
base_model="meta-llama/Llama-2-7b-hf",
output_s3_location="s3://bucket/eval-results/",
mlflow_resource_arn="arn:aws:sagemaker:..."
)
execution = evaluator.evaluate(subtask="college_mathematics")
execution.wait()
execution.show_results()
Use built-in metrics or custom evaluators
from sagemaker.train.evaluate import CustomScorerEvaluator, get_builtin_metrics
# Discover built-in metrics
BuiltInMetric = get_builtin_metrics()
# [PRIME_MATH, PRIME_CODE]
# Using built-in metric
evaluator = CustomScorerEvaluator(
evaluator=BuiltInMetric.PRIME_MATH,
dataset="s3://bucket/eval-data.jsonl",
model_package_arn="arn:aws:sagemaker:...",
mlflow_resource_arn="arn:aws:sagemaker:..."
)
execution = evaluator.evaluate()
execution.wait()
execution.show_results()
Leverage large language models for nuanced evaluation with explanations:
from sagemaker.train.evaluate import LLMAsJudgeEvaluator
evaluator = LLMAsJudgeEvaluator(
judge_model_id="anthropic.claude-3-5-haiku-20241022-v1:0",
evaluation_prompt="Rate the helpfulness of this response",
dataset="s3://bucket/eval-data.jsonl",
model_package_arn="arn:aws:sagemaker:...",
mlflow_resource_arn="arn:aws:sagemaker:..."
)
execution = evaluator.evaluate()
execution.wait()
# Show first 5 results
execution.show_results()
# Show next 5 with explanations
execution.show_results(limit=5, offset=5, show_explanations=True)
Flexible deployment options for production inference. Deploy your fine-tuned models to SageMaker endpoints or Amazon Bedrock.
from sagemaker.core.resources import TrainingJob
from sagemaker.serve import ModelBuilder
training_job = TrainingJob.get(training_job_name="my-training-job")
model_builder = ModelBuilder(model=training_job)
model = model_builder.build()
endpoint = model_builder.deploy(endpoint_name="my-endpoint")
from sagemaker.core.resources import ModelPackage
model_package = ModelPackage.get(model_package_name="arn:aws:sagemaker:...")
model_builder = ModelBuilder(model=model_package)
model_builder.build()
endpoint = model_builder.deploy(endpoint_name="my-endpoint")
trainer = SFTTrainer(...)
training_job = trainer.train()
model_builder = ModelBuilder(model=trainer)
endpoint = model_builder.deploy()
# Deploy base model
model_builder = ModelBuilder(model=training_job)
model_builder.build()
endpoint = model_builder.deploy(endpoint_name="my-endpoint")
# Deploy adapter to same endpoint
model_builder2 = ModelBuilder(model=training_job2)
model_builder2.build()
endpoint2 = model_builder2.deploy(
endpoint_name="my-endpoint", # Same endpoint
inference_component_name="my-adapter" # New adapter
)
from sagemaker.serve.bedrock_model_builder import BedrockModelBuilder
training_job = TrainingJob.get(training_job_name="my-training-job")
bedrock_builder = BedrockModelBuilder(model=training_job)
deployment_result = bedrock_builder.deploy(
job_name="my-bedrock-job",
imported_model_name="my-bedrock-model",
role_arn="arn:aws:iam::..."
)
model_builder = ModelBuilder(model=training_job)
endpoint_names = model_builder.fetch_endpoint_names_for_base_model()
# Returns: set of endpoint names
from sagemaker.train import SFTTrainer
from sagemaker.train.common import TrainingType
from sagemaker.ai_registry.dataset import DataSet
# 1. Register your dataset
dataset = DataSet.create(
name="my-training-data",
source="s3://bucket/train.jsonl",
customization_technique="SFT"
)
# 2. Create trainer with MLflow tracking
trainer = SFTTrainer(
model="meta-llama/Llama-2-7b-hf",
training_type=TrainingType.LORA,
model_package_group_name="my-models",
mlflow_resource_arn="arn:aws:sagemaker:region:account:mlflow-tracking-server/...",
mlflow_experiment_name="llama-fine-tuning",
training_dataset=dataset.arn
)
# 3. Customize hyperparameters
trainer.hyperparameters.learning_rate = 0.0001
trainer.hyperparameters.max_epochs = 5
# 4. Start training (non-blocking)
training_job = trainer.train(wait=False)
# 5. Monitor progress
training_job.wait()
training_job.refresh()
# 6. Get fine-tuned model
model_package_arn = training_job.output_model_package_arn
print(f"Fine-tuned model: {model_package_arn}")
# 7. Deploy the model
model_builder = ModelBuilder(model=training_job)
model_builder.build()
endpoint = model_builder.deploy(endpoint_name="my-endpoint")
# 8. Evaluate the model
from sagemaker.train.evaluate import BenchMarkEvaluator, get_benchmarks
Benchmark = get_benchmarks()
evaluator = BenchMarkEvaluator(
benchmark=Benchmark.MMLU,
model_package_arn=model_package_arn,
mlflow_resource_arn="arn:aws:sagemaker:..."
)
execution = evaluator.evaluate()
execution.wait()
execution.show_results()
Explore complete end-to-end examples in the v3-examples/model-customization-examples/ directory:
Available in v3-examples/model-customization-examples/
Update pyproject.toml and prepare for v3.0.1 release by @zhaoqizqwang in https://github.com/aws/sagemaker-python-sdk/pull/5329
Full Changelog: https://github.com/aws/sagemaker-python-sdk/compare/v3.0.0...v3.0.1
This release is created retroactively for code deployed on Thu Nov 20 2025 All changes listed below are already live in production.
Nothing published for this version
Show V2 deprecation note on every documentation page
v2.257.5 (2026-07-14) Bug Fixes Read the Docs build failure
Add noindex and canonical tags to deprecated V2 docs
Improve subprocess exception handling in git_utils
Security fixes for Triton HMAC key exposure and missing integrity check (v2)
Fix test failures with pytest and setuptools compatibility
Update image URIs for DJL 0.36.0 release
### Bug fixes and Other Changes * Bug fixes remote function
Image for Numpy 2.0 support with XGBoost
Extracts reward Lambda ARN from Nova recipes
Nothing published for this version
update get_execution_role to directly return the ExecutionRoleArn if it presents in the resource metadata file
[Hugging Face][Pytorch] Inference DLC 4.51.3
Update instance type regex to also include hyphens
Added condition to allow eval recipe.
add eval custom lambda arn to hyperparameters
Nothing published for this version
### Bug Fixes and Other Changes * chore: onboard tei 1.8.0
dockerfile stuck on interactive shell
Add support for InstancePlacementConfig in Estimator for training jobs running on ultraserver capacity
AWS Batch for SageMaker Training jobs
Relax boto3 version requirement
### Bug Fixes and Other Changes * Nova training support
integrate amtviz for visualization of tuning jobs
update image_uri_configs 06-19-2025 07:18:34 PST
Add support for MetricDefinitions in ModelTrainer
Update Attrs version to widen support
Your coding agent can read these notes before it upgrades. Set up the MCP server →