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.
pip install sagemakerVerified import paths — ran on the pinned version, not inferred.
Quickstart example to get the execution role using Amazon SageMaker.
Explicitly set `accept_eula` to `True` in the ModelBuilder's LoRA deployment path.
Set the IAM role correctly using the `role` parameter in the `Evaluate` class.
Use the `ModelTrainer` class instead of the `Estimator` class.
pip install sagemaker
Configure AWS credentials using `aws configure` via the AWS CLI, set `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables, or ensure your execution environment (e.g., SageMaker notebook instance, EC2) has an attached IAM role with appropriate permissions.
Use `sagemaker.get_execution_role()` to automatically fetch the ARN if running in a SageMaker environment, or provide the complete ARN string, e.g., 'arn:aws:iam::123456789012:role/SageMakerExecutionRole'.
Update the `framework_version` parameter in your estimator definition to one of the supported versions listed in the error message, for example: `sagemaker.tensorflow.TensorFlow(framework_version='2.12', ...)`.