Intel(R) Extension for Scikit-learn is a seamless way to speed up your Scikit-learn application.
Project description
Intel(R) Extension for Scikit-learn*
With Intel(R) Extension for Scikit-learn you can accelerate your Scikit-learn applications and still have full conformance with all Scikit-Learn APIs and algorithms. This is a free software AI accelerator that brings over 10-100X acceleration across a variety of applications. And you do not even need to change the existing code!
The acceleration is achieved through the use of the Intel(R) oneAPI Data Analytics Library (oneDAL). Patching scikit-learn makes it a well-suited machine learning framework for dealing with real-life problems.
⚠️Intel(R) Extension for Scikit-learn contains scikit-learn patching functionality that was originally available in daal4py package. All future updates for the patches will be available only in Intel(R) Extension for Scikit-learn. We recommend you to use scikit-learn-intelex package instead of daal4py. You can learn more about daal4py in daal4py documentation.
👀 Follow us on Medium
We publish blogs on Medium, so follow us to learn tips and tricks for more efficient data analysis with the help of Intel(R) Extension for Scikit-learn. Here are our latest blogs:
- Save Time and Money with Intel Extension for Scikit-learn
- Superior Machine Learning Performance on the Latest Intel Xeon Scalable Processors
- Leverage Intel Optimizations in Scikit-Learn
- Intel Gives Scikit-Learn the Performance Boost Data Scientists Need
- From Hours to Minutes: 600x Faster SVM
- Improve the Performance of XGBoost and LightGBM Inference
- Accelerate Kaggle Challenges Using Intel AI Analytics Toolkit
- Accelerate Your scikit-learn Applications
- Accelerate Linear Models for Machine Learning
- Accelerate K-Means Clustering
🔗 Important links
- Notebook examples
- Documentation
- scikit-learn API and patching
- Benchmark code
- Building from Sources
- About Intel(R) oneAPI Data Analytics Library
- About Intel(R) daal4py
💬 Support
Report issues, ask questions, and provide suggestions using:
You may reach out to project maintainers privately at onedal.maintainers@intel.com
🛠 Installation
Intel(R) Extension for Scikit-learn is available at the Python Package Index, on Anaconda Cloud in Conda-Forge channel and in Intel channel. Intel(R) Extension for Scikit-learn is also available as a part of Intel® oneAPI AI Analytics Toolkit (AI Kit).
- PyPi (recommended by default)
pip install scikit-learn-intelex
- Anaconda Cloud from Conda-Forge channel (recommended for conda users by default)
conda config --add channels conda-forge
conda config --set channel_priority strict
conda install scikit-learn-intelex
- Anaconda Cloud from Intel channel (recommended for Intel® Distribution for Python users)
conda config --add channels intel
conda config --set channel_priority strict
conda install scikit-learn-intelex
[Click to expand] ℹ️ Supported configurations
📦 PyPi channel
OS / Python version | Python 3.8 | Python 3.9 | Python 3.10 | Python 3.11 | Python 3.12 |
---|---|---|---|---|---|
Linux | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] |
Windows | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] |
📦 Anaconda Cloud: Conda-Forge channel
OS / Python version | Python 3.8 | Python 3.9 | Python 3.10 | Python 3.11 | Python 3.12 |
---|---|---|---|---|---|
Linux | [CPU] | [CPU] | [CPU] | [CPU] | [CPU] |
Windows | [CPU] | [CPU] | [CPU] | [CPU] | [CPU] |
📦 Anaconda Cloud: Intel channel
OS / Python version | Python 3.8 | Python 3.9 | Python 3.10 | Python 3.11 | Python 3.12 |
---|---|---|---|---|---|
Linux | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] |
Windows | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] |
⚠️ Note: GPU support is an optional dependency. Required dependencies for GPU support will not be downloaded. You need to manually install dpcpp_cpp_rt package.
[Click to expand] ℹ️ How to install dpcpp_cpp_rt package
- PyPi
pip install --upgrade dpcpp_cpp_rt
- Anaconda Cloud
conda install dpcpp_cpp_rt -c intel
You can build the package from sources as well.
⚡️ Get Started
Intel CPU optimizations patching
import numpy as np
from sklearnex import patch_sklearn
patch_sklearn()
from sklearn.cluster import DBSCAN
X = np.array([[1., 2.], [2., 2.], [2., 3.],
[8., 7.], [8., 8.], [25., 80.]], dtype=np.float32)
clustering = DBSCAN(eps=3, min_samples=2).fit(X)
Intel GPU optimizations patching
import numpy as np
import dpctl
from sklearnex import patch_sklearn, config_context
patch_sklearn()
from sklearn.cluster import DBSCAN
X = np.array([[1., 2.], [2., 2.], [2., 3.],
[8., 7.], [8., 8.], [25., 80.]], dtype=np.float32)
with config_context(target_offload="gpu:0"):
clustering = DBSCAN(eps=3, min_samples=2).fit(X)
🚀 Scikit-learn patching
Configurations:
- HW: c5.24xlarge AWS EC2 Instance using an Intel Xeon Platinum 8275CL with 2 sockets and 24 cores per socket
- SW: scikit-learn version 0.24.2, scikit-learn-intelex version 2021.2.3, Python 3.8
[Click to expand] ℹ️ Reproduce results
- With Intel® Extension for Scikit-learn enabled:
python runner.py --configs configs/blogs/skl_conda_config.json -–report
- With the original Scikit-learn:
python runner.py --configs configs/blogs/skl_conda_config.json -–report --no-intel-optimized
Intel(R) Extension for Scikit-learn patching affects performance of specific Scikit-learn functionality. Refer to the list of supported algorithms and parameters for details. In cases when unsupported parameters are used, the package fallbacks into original Scikit-learn. If the patching does not cover your scenarios, submit an issue on GitHub.
⚠️ We support optimizations for the last four versions of scikit-learn. The latest release of scikit-learn-intelex-2024.0.X supports scikit-learn 1.0.X, 1.1.X, 1.2.X and 1.3.X.
📜 Intel(R) Extension for Scikit-learn verbose
To find out which implementation of the algorithm is currently used (Intel(R) Extension for Scikit-learn or original Scikit-learn), set the environment variable:
- On Linux:
export SKLEARNEX_VERBOSE=INFO
- On Windows:
set SKLEARNEX_VERBOSE=INFO
For example, for DBSCAN you get one of these print statements depending on which implementation is used:
SKLEARNEX INFO: sklearn.cluster.DBSCAN.fit: running accelerated version on CPU
SKLEARNEX INFO: sklearn.cluster.DBSCAN.fit: fallback to original Scikit-learn
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file scikit_learn_intelex-2025.0.0-py312-none-win_amd64.whl
.
File metadata
- Download URL: scikit_learn_intelex-2025.0.0-py312-none-win_amd64.whl
- Upload date:
- Size: 3.1 MB
- Tags: Python 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.32.3 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36d3d1e14c395b209361ac365d7891ebe401644f9313bfaf57414d4d0bac4618 |
|
MD5 | 11ff0da5e6270206b67073677eeba4d9 |
|
BLAKE2b-256 | e3e643ba988b76a382fdf65026e92e90a32f2f480f6dd211283bc6893ede5b40 |
File details
Details for the file scikit_learn_intelex-2025.0.0-py312-none-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: scikit_learn_intelex-2025.0.0-py312-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 4.2 MB
- Tags: Python 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.32.3 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 339b191f735e78eac235e3d61a39c9f5706d39f7beb6cdffbecc34cd3e9fb65b |
|
MD5 | 30ce42668ca59e9179290c4794d47faa |
|
BLAKE2b-256 | 8f3f97bf040b7207490e858cd6451b93b6cccc504eadc04bf019cd9d37b5f24e |
File details
Details for the file scikit_learn_intelex-2025.0.0-py311-none-win_amd64.whl
.
File metadata
- Download URL: scikit_learn_intelex-2025.0.0-py311-none-win_amd64.whl
- Upload date:
- Size: 3.0 MB
- Tags: Python 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.32.3 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0f480f984d64ffc3df02fb973b9c8603856a209c6303cc422ee8f7783d245d6 |
|
MD5 | a85ae83ca1de0a057311bf033342d999 |
|
BLAKE2b-256 | 08f3b330a6f9437c7747f36713a084f244fbc9641397d76b7945f81d86128b76 |
File details
Details for the file scikit_learn_intelex-2025.0.0-py311-none-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: scikit_learn_intelex-2025.0.0-py311-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 4.2 MB
- Tags: Python 3.11, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.32.3 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20d06e7aa51e4905827099ff23a3b016eb515e0d88d5dbf316dfc19d7b85269f |
|
MD5 | 5c87cce6bfd6fb2f13d5d7bf66c66799 |
|
BLAKE2b-256 | 6cf75622f571cd1e02468aab31cc01e91b095cd3f0d9d4cef3c0327a6dbbd3f9 |
File details
Details for the file scikit_learn_intelex-2025.0.0-py310-none-win_amd64.whl
.
File metadata
- Download URL: scikit_learn_intelex-2025.0.0-py310-none-win_amd64.whl
- Upload date:
- Size: 3.0 MB
- Tags: Python 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.32.3 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eaeaa81eedd314dfdf519eb2448811ffb12a673104fb2d8b744087a199838935 |
|
MD5 | 786e8950d2b7a30986cbbe9a260700be |
|
BLAKE2b-256 | b593ef43f92d4ad82ded717bfeb4bfb0094fd426130cabe2fb6a18a75d0ade85 |
File details
Details for the file scikit_learn_intelex-2025.0.0-py310-none-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: scikit_learn_intelex-2025.0.0-py310-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 4.2 MB
- Tags: Python 3.10, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.32.3 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ddde8631538a53a22f598f4def1182f0e14bd8911364aae0019f0b49edeeefe |
|
MD5 | 11fa5227d3ca7ad0937208c7db82870f |
|
BLAKE2b-256 | a3bbb0543e0f0ab62c3411ddb51a80f54b8c73bd307e627959887f0fb48e575a |
File details
Details for the file scikit_learn_intelex-2025.0.0-py39-none-win_amd64.whl
.
File metadata
- Download URL: scikit_learn_intelex-2025.0.0-py39-none-win_amd64.whl
- Upload date:
- Size: 2.9 MB
- Tags: Python 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.32.3 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | af5b795de664b7351746c66bde607794d4018b25f1705140c488326bfab166ff |
|
MD5 | f1355173373e80b9b2562cb02c3fd379 |
|
BLAKE2b-256 | f7e4eec10f5743a405c2e1bf87ee3b63e76f566eeba9023e93c8d3504dc27a0e |
File details
Details for the file scikit_learn_intelex-2025.0.0-py39-none-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: scikit_learn_intelex-2025.0.0-py39-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 4.2 MB
- Tags: Python 3.9, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.32.3 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 299487bed1fdaf446258d938decc1c04d738856d45e2d09ef7e4d1f7849e3cca |
|
MD5 | 5c4a78994645fe0b9e76aa702e162588 |
|
BLAKE2b-256 | 5cf1e976acacecebfb968ab1af9e32d0d26194e7f296c6c3696432a94510c945 |