{"id":1702,"library":"sagemaker","title":"Amazon SageMaker","description":"Amazon SageMaker is an open-source library for training and deploying models on Amazon SageMaker. The current version is 3.7.1, and it is released regularly with new features and bug fixes. It requires Python version 3.9 or higher.","status":"active","version":"3.7.1","language":"en","source_language":"en","source_url":"https://github.com/aws/sagemaker-python-sdk","tags":["Amazon SageMaker","Machine Learning","AWS"],"install":[{"cmd":"pip install sagemaker","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Amazon SageMaker is built on top of AWS services and uses boto3 for API calls","package":"boto3","optional":false}],"imports":[{"note":"The sagemaker library should be imported directly.","symbol":"sagemaker","correct":"import sagemaker"},{"note":"The SageMaker class should be imported from the top-level sagemaker module.","wrong":"from sagemaker.sagemaker import SageMaker","symbol":"SageMaker","correct":"from sagemaker import SageMaker"}],"quickstart":{"code":"import sagemaker\nfrom sagemaker import get_execution_role\n\nrole = get_execution_role()\nprint(role)","lang":"python","description":"Quickstart example to get the execution role using Amazon SageMaker."},"warnings":[{"fix":"Explicitly set `accept_eula` to `True` in the ModelBuilder's LoRA deployment path.","message":"In version 3.7.1, the ModelBuilder's LoRA deployment path now respects the user-provided `accept_eula` value. If not set to `True`, it raises a `ValueError`.","severity":"breaking","affected_versions":">=3.7.1"},{"fix":"Set the IAM role correctly using the `role` parameter in the `Evaluate` class.","message":"When using the `Evaluate` class, it's essential to set the IAM role correctly to avoid permission errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Use the `ModelTrainer` class instead of the `Estimator` class.","message":"The `Estimator` class is deprecated in favor of the `ModelTrainer` class.","severity":"deprecated","affected_versions":">=3.4.0"}],"env_vars":null,"last_verified":"2026-04-08T00:00:00.000Z","next_check":"2026-07-07T00:00:00.000Z"}