Resources for using Scikit-learn with Amazon SageMaker AI - Amazon SageMaker AI
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Resources for using Scikit-learn with Amazon SageMaker AI

You can use Amazon SageMaker AI to train and deploy a model using custom Scikit-learn code. The SageMaker AI Python SDK Scikit-learn estimators and models and the SageMaker AI open-source Scikit-learn containers make writing a Scikit-learn script and running it in SageMaker AI easier. The following section provides reference material you can use to learn how to use Scikit-learn with SageMaker AI.

Requirements

Scikit-learn 1.2 has the following dependencies.

Dependency Minimum version
Python 3.8
NumPy 1.17.3
SciPy 1.3.2
joblib 1.1.1
threadpoolctl 2.0.0

The SageMaker AI Scikit-learn container supports the following Scikit-learn versions.

Supported Scikit-learn version Minimum Python version
1.2-1 3.8
1.0-1 3.7
0.23-1 3.6
0.20.0 2.7 or 3.4

For general information about writing Scikit-learn training scripts and using Scikit-learn estimators and models with SageMaker AI, see Using Scikit-learn with the SageMaker Python SDK.

What do you want to do?

Note

Matplotlib v2.2.3 or newer is required to run the SageMaker AI Scikit-learn example notebooks.

I want to use Scikit-learn for data processing, feature engineering, or model evaluation in SageMaker AI.

For a sample Jupyter notebook, see https://github.com/awslabs/amazon-sagemaker-examples/tree/master/sagemaker_processing/scikit_learn_data_processing_and_model_evaluation.

For a blog post on training and deploying a Scikit-learn model, see Amazon SageMaker AI adds Scikit-Learn support.

For documentation, see ReadTheDocs.

I want to train a custom Scikit-learn model in SageMaker AI.

For a sample Jupyter notebook, see https://github.com/awslabs/amazon-sagemaker-examples/tree/master/sagemaker-python-sdk/scikit_learn_iris.

For documentation, see Train a Model with Scikit-learn.

I have a Scikit-learn model that I trained in SageMaker AI, and I want to deploy it to a hosted endpoint.

For more information, see Deploy Scikit-learn models.

I have a Scikit-learn model that I trained outside of SageMaker AI, and I want to deploy it to a SageMaker AI endpoint

For more information, see Deploy Endpoints from Model Data.

I want to see the API documentation for Amazon SageMaker Python SDK Scikit-learn classes.

For more information, see Scikit-learn Classes.

I want to see information about SageMaker AI Scikit-learn containers.

For more information, see SageMaker Scikit-learn Container GitHub repository.