{"id":13667620,"url":"https://github.com/aws/sagemaker-python-sdk","last_synced_at":"2026-04-01T19:09:50.477Z","repository":{"id":37269924,"uuid":"110621895","full_name":"aws/sagemaker-python-sdk","owner":"aws","description":"A library for training and deploying machine learning models on Amazon SageMaker","archived":false,"fork":false,"pushed_at":"2025-05-06T00:50:45.000Z","size":170394,"stargazers_count":2157,"open_issues_count":333,"forks_count":1168,"subscribers_count":135,"default_branch":"master","last_synced_at":"2025-05-06T16:10:45.857Z","etag":null,"topics":["aws","huggingface","machine-learning","mxnet","python","pytorch","sagemaker","tensorflow"],"latest_commit_sha":null,"homepage":"https://sagemaker.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aws.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-11-14T01:03:33.000Z","updated_at":"2025-05-06T00:50:48.000Z","dependencies_parsed_at":"2023-10-14T17:58:38.698Z","dependency_job_id":"3d3d308f-7389-48fc-b066-ee3dde67e8b5","html_url":"https://github.com/aws/sagemaker-python-sdk","commit_stats":{"total_commits":3865,"total_committers":487,"mean_commits":7.936344969199179,"dds":0.7184993531694697,"last_synced_commit":"edec8c7bb9fd49c9f21e7738b8898afa92baf105"},"previous_names":[],"tags_count":636,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Fsagemaker-python-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Fsagemaker-python-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Fsagemaker-python-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Fsagemaker-python-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aws","download_url":"https://codeload.github.com/aws/sagemaker-python-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253990449,"owners_count":21995773,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","huggingface","machine-learning","mxnet","python","pytorch","sagemaker","tensorflow"],"created_at":"2024-08-02T07:00:44.225Z","updated_at":"2026-01-22T01:07:55.052Z","avatar_url":"https://github.com/aws.png","language":"Python","readme":".. image:: https://github.com/aws/sagemaker-python-sdk/raw/master/branding/icon/sagemaker-banner.png\n    :height: 100px\n    :alt: SageMaker\n\n====================\nSageMaker Python SDK\n====================\n\n.. image:: https://img.shields.io/pypi/v/sagemaker.svg\n   :target: https://pypi.python.org/pypi/sagemaker\n   :alt: Latest Version\n\n.. image:: https://img.shields.io/pypi/pyversions/sagemaker.svg\n   :target: https://pypi.python.org/pypi/sagemaker\n   :alt: Supported Python Versions\n\n.. image:: https://img.shields.io/badge/code_style-black-000000.svg\n   :target: https://github.com/python/black\n   :alt: Code style: black\n\n.. image:: https://readthedocs.org/projects/sagemaker/badge/?version=stable\n   :target: https://sagemaker.readthedocs.io/en/stable/\n   :alt: Documentation Status\n\n.. image:: https://github.com/aws/sagemaker-python-sdk/actions/workflows/codebuild-ci-health.yml/badge.svg\n    :target: https://github.com/aws/sagemaker-python-sdk/actions/workflows/codebuild-ci-health.yml\n    :alt: CI Health\n\nSageMaker Python SDK is an open source library for training and deploying machine learning models on Amazon SageMaker.\n\nWith the SDK, you can train and deploy models using popular deep learning frameworks **Apache MXNet** and **PyTorch**.\nYou can also train and deploy models with **Amazon algorithms**,\nwhich are scalable implementations of core machine learning algorithms that are optimized for SageMaker and GPU training.\nIf you have **your own algorithms** built into SageMaker compatible Docker containers, you can train and host models using these as well.\n\nTo install SageMaker Python SDK, see `Installing SageMaker Python SDK \u003c#installing-the-sagemaker-python-sdk\u003e`_.\n\n❗🔥 SageMaker V3 Release\n-------------------------\n\nVersion 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.\n\n**Important: Please review these breaking changes before upgrading.**\n\n* Older interfaces such as Estimator, Model, Predictor and all their subclasses will not be supported in V3. \n* Please see our `V3 examples folder \u003chttps://github.com/aws/sagemaker-python-sdk/tree/master/v3-examples\u003e`__ for example notebooks and usage patterns.\n\n\nMigrating to V3\n----------------\n\n**Upgrading to 3.x**\n\nTo upgrade to the latest version of SageMaker Python SDK 3.x:\n\n::\n\n    pip install --upgrade sagemaker\n\nIf you prefer to downgrade to the 2.x version:\n\n::\n\n    pip install sagemaker==2.*\n\nSee `SageMaker V2 Examples \u003c#sagemaker-v2-examples\u003e`__ for V2 documentation and examples.\n\n**Key Benefits of 3.x**\n\n* **Modular Architecture**: Separate PyPI packages for core, training, and serving capabilities\n\n  * `sagemaker-core \u003chttps://pypi.org/project/sagemaker-core/\u003e`__\n  * `sagemaker-train \u003chttps://pypi.org/project/sagemaker-train/\u003e`__\n  * `sagemaker-serve \u003chttps://pypi.org/project/sagemaker-serve/\u003e`__\n  * `sagemaker-mlops \u003chttps://pypi.org/project/sagemaker-mlops/\u003e`__\n\n* **Unified Training \u0026 Inference**: Single classes (ModelTrainer, ModelBuilder) replace multiple framework-specific classes\n* **Object-Oriented API**: Structured interface with auto-generated configs aligned with AWS APIs\n* **Simplified Workflows**: Reduced boilerplate and more intuitive interfaces\n\n**Training Experience**\n\nV3 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.).\n\nThis example shows how to train a model using a custom training container with training data from S3.\n\n*SageMaker Python SDK 2.x:*\n\n.. code:: python\n\n    from sagemaker.estimator import Estimator\n    estimator = Estimator(\n        image_uri=\"my-training-image\",\n        role=\"arn:aws:iam::123456789012:role/SageMakerRole\",\n        instance_count=1,\n        instance_type=\"ml.m5.xlarge\",\n        output_path=\"s3://my-bucket/output\"\n    )\n    estimator.fit({\"training\": \"s3://my-bucket/train\"})\n\n*SageMaker Python SDK 3.x:*\n\n.. code:: python\n\n    from sagemaker.train import ModelTrainer\n    from sagemaker.train.configs import InputData\n\n    trainer = ModelTrainer(\n        training_image=\"my-training-image\",\n        role=\"arn:aws:iam::123456789012:role/SageMakerRole\"\n    )\n\n    train_data = InputData(\n        channel_name=\"training\",\n        data_source=\"s3://my-bucket/train\"\n    )\n\n    trainer.train(input_data_config=[train_data])\n\n**See more examples:** `SageMaker V3 Examples \u003c#sagemaker-v3-examples\u003e`__\n\n**Inference Experience**\n\nV3 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.).\n\nThis example shows how to deploy a trained model for real-time inference.\n\n*SageMaker Python SDK 2.x:*\n\n.. code:: python\n\n    from sagemaker.model import Model\n    from sagemaker.predictor import Predictor\n    model = Model(\n        image_uri=\"my-inference-image\",\n        model_data=\"s3://my-bucket/model.tar.gz\",\n        role=\"arn:aws:iam::123456789012:role/SageMakerRole\"\n    )\n    predictor = model.deploy(\n        initial_instance_count=1,\n        instance_type=\"ml.m5.xlarge\"\n    )\n    result = predictor.predict(data)\n\n*SageMaker Python SDK 3.x:*\n\n.. code:: python\n\n    from sagemaker.serve import ModelBuilder\n    model_builder = ModelBuilder(\n        model=\"my-model\",\n        model_path=\"s3://my-bucket/model.tar.gz\"\n    )\n    endpoint = model_builder.build()\n    result = endpoint.invoke(...)\n\n**See more examples:** `SageMaker V3 Examples \u003c#sagemaker-v3-examples\u003e`__\n\nSageMaker V3 Examples\n---------------------\n\n**Training Examples**\n\n#. `Custom Distributed Training Example \u003chttps://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/training-examples/custom-distributed-training-example.ipynb\u003e`__\n#. `Distributed Local Training Example \u003chttps://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/training-examples/distributed-local-training-example.ipynb\u003e`__\n#. `Hyperparameter Training Example \u003chttps://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/training-examples/hyperparameter-training-example.ipynb\u003e`__\n#. `JumpStart Training Example \u003chttps://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/training-examples/jumpstart-training-example.ipynb\u003e`__\n#. `Local Training Example \u003chttps://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/training-examples/local-training-example.ipynb\u003e`__\n\n**Inference Examples**\n\n#. `HuggingFace Example \u003chttps://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/inference-examples/huggingface-example.ipynb\u003e`__\n#. `In-Process Mode Example \u003chttps://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/inference-examples/in-process-mode-example.ipynb\u003e`__\n#. `Inference Spec Example \u003chttps://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/inference-examples/inference-spec-example.ipynb\u003e`__\n#. `JumpStart E2E Training Example \u003chttps://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/inference-examples/jumpstart-e2e-training-example.ipynb\u003e`__\n#. `JumpStart Example \u003chttps://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/inference-examples/jumpstart-example.ipynb\u003e`__\n#. `Local Mode Example \u003chttps://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/inference-examples/local-mode-example.ipynb\u003e`__\n#. `Optimize Example \u003chttps://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/inference-examples/optimize-example.ipynb\u003e`__\n#. `Train Inference E2E Example \u003chttps://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/inference-examples/train-inference-e2e-example.ipynb\u003e`__\n\n**ML Ops Examples**\n\n#. `V3 Hyperparameter Tuning Example \u003chttps://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/ml-ops-examples/v3-hyperparameter-tuning-example/v3-hyperparameter-tuning-example.ipynb\u003e`__\n#. `V3 Hyperparameter Tuning Pipeline \u003chttps://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/ml-ops-examples/v3-hyperparameter-tuning-example/v3-hyperparameter-tuning-pipeline.ipynb\u003e`__\n#. `V3 Model Registry Example \u003chttps://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/ml-ops-examples/v3-model-registry-example/v3-model-registry-example.ipynb\u003e`__\n#. `V3 PyTorch Processing Example \u003chttps://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/ml-ops-examples/v3-processing-job-pytorch/v3-pytorch-processing-example.ipynb\u003e`__\n#. `V3 Pipeline Train Create Registry \u003chttps://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/ml-ops-examples/v3-pipeline-train-create-registry.ipynb\u003e`__\n#. `V3 Processing Job Sklearn \u003chttps://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/ml-ops-examples/v3-processing-job-sklearn.ipynb\u003e`__\n#. `V3 SageMaker Clarify \u003chttps://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/ml-ops-examples/v3-sagemaker-clarify.ipynb\u003e`__\n#. `V3 Transform Job Example \u003chttps://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/ml-ops-examples/v3-transform-job-example.ipynb\u003e`__\n\n**Looking for V2 Examples?** See `SageMaker V2 Examples \u003c#sagemaker-v2-examples\u003e`__ below.\n\n\n\n\nInstalling the SageMaker Python SDK\n-----------------------------------\n\nThe SageMaker Python SDK is built to PyPI and the latest version of the SageMaker Python SDK can be installed with pip as follows\n::\n\n    pip install sagemaker==\u003cLatest version from pyPI from https://pypi.org/project/sagemaker/\u003e\n\nYou can install from source by cloning this repository and running a pip install command in the root directory of the repository:\n\n::\n\n    git clone https://github.com/aws/sagemaker-python-sdk.git\n    cd sagemaker-python-sdk\n    pip install .\n\nSupported Operating Systems\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nSageMaker Python SDK supports Unix/Linux and Mac.\n\nSupported Python Versions\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nSageMaker Python SDK is tested on:\n\n- Python 3.9\n- Python 3.10\n- Python 3.11\n- Python 3.12\n\nTelemetry\n~~~~~~~~~~~~~~~\n\nThe ``sagemaker`` library has telemetry enabled to help us better understand user needs, diagnose issues, and deliver new features. This telemetry tracks the usage of various SageMaker functions.\n\nIf you prefer to opt out of telemetry, you can easily do so by setting the ``TelemetryOptOut`` parameter to ``true`` in the SDK defaults configuration. For detailed instructions, please visit `Configuring and using defaults with the SageMaker Python SDK \u003chttps://sagemaker.readthedocs.io/en/stable/overview.html#configuring-and-using-defaults-with-the-sagemaker-python-sdk\u003e`__.\n\nAWS Permissions\n~~~~~~~~~~~~~~~\n\nAs a managed service, Amazon SageMaker performs operations on your behalf on the AWS hardware that is managed by Amazon SageMaker.\nAmazon SageMaker can perform only operations that the user permits.\nYou can read more about which permissions are necessary in the `AWS Documentation \u003chttps://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html\u003e`__.\n\nThe SageMaker Python SDK should not require any additional permissions aside from what is required for using SageMaker.\nHowever, if you are using an IAM role with a path in it, you should grant permission for ``iam:GetRole``.\n\nLicensing\n~~~~~~~~~\nSageMaker Python SDK is licensed under the Apache 2.0 License. It is copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. The license is available at:\nhttp://aws.amazon.com/apache2.0/\n\nRunning tests\n~~~~~~~~~~~~~\n\nSageMaker Python SDK has unit tests and integration tests.\n\nYou can install the libraries needed to run the tests by running :code:`pip install --upgrade .[test]` or, for Zsh users: :code:`pip install --upgrade .\\[test\\]`\n\n**Unit tests**\n\nWe run unit tests with tox, which is a program that lets you run unit tests for multiple Python versions, and also make sure the\ncode fits our style guidelines. We run tox with `all of our supported Python versions \u003c#supported-python-versions\u003e`_, so to run unit tests\nwith the same configuration we do, you need to have interpreters for those Python versions installed.\n\nTo run the unit tests with tox, run:\n\n::\n\n    tox tests/unit\n\n**Integration tests**\n\nTo run the integration tests, the following prerequisites must be met\n\n1. AWS account credentials are available in the environment for the boto3 client to use.\n2. The AWS account has an IAM role named :code:`SageMakerRole`.\n   It should have the AmazonSageMakerFullAccess policy attached as well as a policy with `the necessary permissions to use Elastic Inference \u003chttps://docs.aws.amazon.com/sagemaker/latest/dg/ei-setup.html\u003e`__.\n3. To run remote_function tests, dummy ecr repo should be created. It can be created by running -\n    :code:`aws ecr create-repository --repository-name remote-function-dummy-container`\n\nWe recommend selectively running just those integration tests you'd like to run. You can filter by individual test function names with:\n\n::\n\n    tox -- -k 'test_i_care_about'\n\n\nYou can also run all of the integration tests by running the following command, which runs them in sequence, which may take a while:\n\n::\n\n    tox -- tests/integ\n\n\nYou can also run them in parallel:\n\n::\n\n    tox -- -n auto tests/integ\n\n\nGit Hooks\n~~~~~~~~~\n\nto enable all git hooks in the .githooks directory, run these commands in the repository directory:\n\n::\n\n    find .git/hooks -type l -exec rm {} \\;\n    find .githooks -type f -exec ln -sf ../../{} .git/hooks/ \\;\n\nTo enable an individual git hook, simply move it from the .githooks/ directory to the .git/hooks/ directory.\n\nBuilding Sphinx docs\n~~~~~~~~~~~~~~~~~~~~\n\nSetup a Python environment, and install the dependencies listed in ``doc/requirements.txt``:\n\n::\n\n    # conda\n    conda create -n sagemaker python=3.12\n    conda activate sagemaker\n    conda install sphinx=5.1.1 sphinx_rtd_theme=0.5.0\n\n    # pip\n    pip install -r doc/requirements.txt\n\n\nClone/fork the repo, and install your local version:\n\n::\n\n    pip install --upgrade .\n\nThen ``cd`` into the ``sagemaker-python-sdk/doc`` directory and run:\n\n::\n\n    make html\n\nYou can edit the templates for any of the pages in the docs by editing the .rst files in the ``doc`` directory and then running ``make html`` again.\n\nPreview the site with a Python web server:\n\n::\n\n    cd _build/html\n    python -m http.server 8000\n\nView the website by visiting http://localhost:8000\n\nSageMaker SparkML Serving\n-------------------------\n\nWith SageMaker SparkML Serving, you can now perform predictions against a SparkML Model in SageMaker.\nIn order to host a SparkML model in SageMaker, it should be serialized with ``MLeap`` library.\n\nFor more information on MLeap, see https://github.com/combust/mleap .\n\nSupported major version of Spark: 3.3 (MLeap version - 0.20.0)\n\nHere is an example on how to create an instance of  ``SparkMLModel`` class and use ``deploy()`` method to create an\nendpoint which can be used to perform prediction against your trained SparkML Model.\n\n.. code:: python\n\n    sparkml_model = SparkMLModel(model_data='s3://path/to/model.tar.gz', env={'SAGEMAKER_SPARKML_SCHEMA': schema})\n    model_name = 'sparkml-model'\n    endpoint_name = 'sparkml-endpoint'\n    predictor = sparkml_model.deploy(initial_instance_count=1, instance_type='ml.c4.xlarge', endpoint_name=endpoint_name)\n\nOnce the model is deployed, we can invoke the endpoint with a ``CSV`` payload like this:\n\n.. code:: python\n\n    payload = 'field_1,field_2,field_3,field_4,field_5'\n    predictor.predict(payload)\n\n\nFor more information about the different ``content-type`` and ``Accept`` formats as well as the structure of the\n``schema`` that SageMaker SparkML Serving recognizes, please see `SageMaker SparkML Serving Container`_.\n\n.. _SageMaker SparkML Serving Container: https://github.com/aws/sagemaker-sparkml-serving-container\n\n\nSageMaker V2 Examples\n---------------------\n\n#. `Using the SageMaker Python SDK \u003chttps://sagemaker.readthedocs.io/en/stable/overview.html\u003e`__\n#. `Using MXNet \u003chttps://sagemaker.readthedocs.io/en/stable/using_mxnet.html\u003e`__\n#. `Using TensorFlow \u003chttps://sagemaker.readthedocs.io/en/stable/using_tf.html\u003e`__\n#. `Using Chainer \u003chttps://sagemaker.readthedocs.io/en/stable/using_chainer.html\u003e`__\n#. `Using PyTorch \u003chttps://sagemaker.readthedocs.io/en/stable/using_pytorch.html\u003e`__\n#. `Using Scikit-learn \u003chttps://sagemaker.readthedocs.io/en/stable/using_sklearn.html\u003e`__\n#. `Using XGBoost \u003chttps://sagemaker.readthedocs.io/en/stable/using_xgboost.html\u003e`__\n#. `SageMaker Reinforcement Learning Estimators \u003chttps://sagemaker.readthedocs.io/en/stable/using_rl.html\u003e`__\n#. `SageMaker SparkML Serving \u003c#sagemaker-sparkml-serving\u003e`__\n#. `Amazon SageMaker Built-in Algorithm Estimators \u003csrc/sagemaker/amazon/README.rst\u003e`__\n#. `Using SageMaker AlgorithmEstimators \u003chttps://sagemaker.readthedocs.io/en/stable/overview.html#using-sagemaker-algorithmestimators\u003e`__\n#. `Consuming SageMaker Model Packages \u003chttps://sagemaker.readthedocs.io/en/stable/overview.html#consuming-sagemaker-model-packages\u003e`__\n#. `BYO Docker Containers with SageMaker Estimators \u003chttps://sagemaker.readthedocs.io/en/stable/overview.html#byo-docker-containers-with-sagemaker-estimators\u003e`__\n#. `SageMaker Automatic Model Tuning \u003chttps://sagemaker.readthedocs.io/en/stable/overview.html#sagemaker-automatic-model-tuning\u003e`__\n#. `SageMaker Batch Transform \u003chttps://sagemaker.readthedocs.io/en/stable/overview.html#sagemaker-batch-transform\u003e`__\n#. `Secure Training and Inference with VPC \u003chttps://sagemaker.readthedocs.io/en/stable/overview.html#secure-training-and-inference-with-vpc\u003e`__\n#. `BYO Model \u003chttps://sagemaker.readthedocs.io/en/stable/overview.html#byo-model\u003e`__\n#. `Inference Pipelines \u003chttps://sagemaker.readthedocs.io/en/stable/overview.html#inference-pipelines\u003e`__\n#. `Amazon SageMaker Operators in Apache Airflow \u003chttps://sagemaker.readthedocs.io/en/stable/using_workflow.html\u003e`__\n#. `SageMaker Autopilot \u003csrc/sagemaker/automl/README.rst\u003e`__\n#. `Model Monitoring \u003chttps://sagemaker.readthedocs.io/en/stable/amazon_sagemaker_model_monitoring.html\u003e`__\n#. `SageMaker Debugger \u003chttps://sagemaker.readthedocs.io/en/stable/amazon_sagemaker_debugger.html\u003e`__\n#. `SageMaker Processing \u003chttps://sagemaker.readthedocs.io/en/stable/amazon_sagemaker_processing.html\u003e`__\n\n🚀 Model Fine-Tuning Support Now Available in V3\n-------------------------------------------------\n\nWe're excited to announce model fine-tuning capabilities in SageMaker Python SDK V3!\n\n**What's New**\n\nFour new trainer classes for fine-tuning foundation models:\n\n* SFTTrainer - Supervised fine-tuning\n* DPOTrainer - Direct preference optimization  \n* RLAIFTrainer - RL from AI feedback\n* RLVRTrainer - RL from verifiable rewards\n\n**Quick Example**\n\n.. code:: python\n\n    from sagemaker.train import SFTTrainer\n    from sagemaker.train.common import TrainingType\n\n    trainer = SFTTrainer(\n        model=\"meta-llama/Llama-2-7b-hf\",\n        training_type=TrainingType.LORA,\n        model_package_group_name=\"my-models\",\n        training_dataset=\"s3://bucket/train.jsonl\"\n    )\n\n    training_job = trainer.train()\n\n**Key Features**\n\n* ✨ LoRA \u0026 full fine-tuning  \n* 📊 MLflow integration with real-time metrics  \n* 🚀 Deploy to SageMaker or Bedrock  \n* 📈 Built-in evaluation (11 benchmarks)  \n* ☁️ Serverless training  \n\n**Get Started**\n\n.. code:: python\n\n    pip install sagemaker\u003e=3.1.0\n\n`📓 Example notebooks \u003chttps://github.com/aws/sagemaker-python-sdk/tree/master/v3-examples/model-customization-examples\u003e`__","funding_links":[],"categories":["AWS Python SDKs","Python","其他_机器学习与深度学习","工作流程和实验跟踪"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws%2Fsagemaker-python-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faws%2Fsagemaker-python-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws%2Fsagemaker-python-sdk/lists"}