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*
Intel(R) Extension for Scikit-learn is a seamless way to speed up your Scikit-learn application. 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.
Running the latest scikit-learn test suite with Intel(R) Extension for Scikit-learn:
👀 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 install scikit-learn-intelex -c conda-forge
- Anaconda Cloud from Intel channel (recommended for Intel® Distribution for Python users)
conda install scikit-learn-intelex -c intel
[Click to expand] ℹ️ Supported configurations
📦 PyPi channel
OS / Python version | Python 3.6 | Python 3.7 | Python 3.8 | Python 3.9 |
---|---|---|---|---|
Linux | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] | ❌ |
Windows | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] | ❌ |
OsX | [CPU] | [CPU] | [CPU] | ❌ |
📦 Anaconda Cloud: Conda-Forge channel
OS / Python version | Python 3.6 | Python 3.7 | Python 3.8 | Python 3.9 |
---|---|---|---|---|
Linux | [CPU] | [CPU] | [CPU] | [CPU] |
Windows | [CPU] | [CPU] | [CPU] | [CPU] |
OsX | [CPU] | [CPU] | [CPU] | [CPU] |
📦 Anaconda Cloud: Intel channel
OS / Python version | Python 3.6 | Python 3.7 | Python 3.8 | Python 3.9 |
---|---|---|---|---|
Linux | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] | ❌ |
Windows | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] | ❌ |
OsX | [CPU] | [CPU] | [CPU] | ❌ |
⚠️ 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
from sklearnex import patch_sklearn
from daal4py.oneapi import sycl_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 sycl_context("gpu"):
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 Intel(R) Extension for Scikit-learn 2021.3.X supports scikit-learn 0.22.X, 0.23.X, 0.24.X and 1.0.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 and Mac OS:
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
Hashes for scikit_learn_intelex-2023.2.0-py311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 403a7b2f724a62dedbab7afb9e8c5f384783f4befde0f56d1ef029a6a398357a |
|
MD5 | 00bfa3f5004cb8c02626e82895ad29c0 |
|
BLAKE2b-256 | d7757300e4d58587e3c5bc4592cd3a6df04e8d787ea4869e1ac296906e0eda43 |
Hashes for scikit_learn_intelex-2023.2.0-py311-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af80c87332b851a7dbdd398db93a6c71718f14dbfedc08e558ee9449d2011ea6 |
|
MD5 | d0c1d8c23913b44b6455e1c82709de70 |
|
BLAKE2b-256 | 3a58f54047ced08c1aaca57464bc84d1085ed06377e7cf67d96815f3463c7873 |
Hashes for scikit_learn_intelex-2023.2.0-py311-none-macosx_10_15_x86_64.macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1cf62791b2f41e5a7c6cdf4279095a1cde157e4e7cea4c27353dc2acda7cd3af |
|
MD5 | 3d65c04a1a1ec875b8cac09ba3577080 |
|
BLAKE2b-256 | edb903fe7a64548c860fd78c426f4c55053b139a6e21e97c4476d73dcc9269f2 |
Hashes for scikit_learn_intelex-2023.2.0-py310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c79700f1bf90a5c65db4fab7a6282d0c91a1e66293782f64e7b809e2f6fcc2f4 |
|
MD5 | 7baddcfe59f5a05681da274cf0ae59e0 |
|
BLAKE2b-256 | 4062f75b45c707e670ac6f9e49ed0841ec4c6e24e563d4aed84c4907fab14572 |
Hashes for scikit_learn_intelex-2023.2.0-py310-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ff8a2de5c259e1ea30c9a0207a2ffc799383f0a5ac6763abc84a1d1c409d975 |
|
MD5 | d7eb627bd8f17332c53e098cbcb05e27 |
|
BLAKE2b-256 | 09b622c1ec708b4450b80e5dc60d924d00e917021474a3241091e2ae0385e89c |
Hashes for scikit_learn_intelex-2023.2.0-py310-none-macosx_10_15_x86_64.macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ae71c48429f88ebb6be4dcb3c310e6f71e8850acea47bad91ac4bba51c8be6d |
|
MD5 | 3d1b4ce1ea12151b54b7280dc5e926ce |
|
BLAKE2b-256 | 9084ff61ba73100160b6cc92d0c3d543b38ea2c2b427ee721be07059d33a16d1 |
Hashes for scikit_learn_intelex-2023.2.0-py39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fadedb9b0a0a64379f8a785d096a6c46e21f170c5d31d5436012edcc1e319345 |
|
MD5 | f6af38cac0de371fdddc9c0b05faf447 |
|
BLAKE2b-256 | 7dc06bdc0e98d6a5e217b74aaa7c35aeb0ca09443097eb9f4936e9520adb45c2 |
Hashes for scikit_learn_intelex-2023.2.0-py39-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb99eca1fe34a5cadbd31c4b44bc2c5f2a72aee23875a28803093bdce997b6f0 |
|
MD5 | 49d13a6c8bcf55ccf1599d7d5687c3ef |
|
BLAKE2b-256 | 72ff85d469567a0d32fbb91bd929661b6b050e36f7e2ff37611f14a2a4eec816 |
Hashes for scikit_learn_intelex-2023.2.0-py39-none-macosx_10_15_x86_64.macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd0948e234a36027e9174adf1ed968953eddba7f8ac4d5a50796406bae8e1dc0 |
|
MD5 | 0dc70bb4a68dffb44fbcc257c7709f42 |
|
BLAKE2b-256 | 90caa6d6486589f196355fae63e271baed2780538b56ad7c4873c63f5b4b2518 |
Hashes for scikit_learn_intelex-2023.2.0-py38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea24f867a26cc070e4ce1270dbbd51439724955eba654db0f9284f21a3e26d78 |
|
MD5 | 8aadbf4467c93f23bf3e432bc2af57c9 |
|
BLAKE2b-256 | 7db3a6d5fc88ff164c8f5440fa8285330b69fff5476f005b78344b9fa1fbc0d2 |
Hashes for scikit_learn_intelex-2023.2.0-py38-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7594f0a9b62a72fedcba0b95b5a3531a3546e38f1f9c910a05ab0d8fe15e2b8b |
|
MD5 | 02ee56041e7951072be689d0fb25dcab |
|
BLAKE2b-256 | 115441d1b5046567430fc402308c6ee3dd270ceb821796818677c15ee921e5d7 |
Hashes for scikit_learn_intelex-2023.2.0-py38-none-macosx_10_15_x86_64.macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23c4ebd651f71f3a3a95906eceb8ede178b9a74b2cddeb228319ecd345ddb8b3 |
|
MD5 | 3e88c4c237c0df45124517b30d767282 |
|
BLAKE2b-256 | cf5ad2d3da9f4ac7bcaecf1d2f4513b89295ec80351093d102f05b4ca4e8cbeb |
Hashes for scikit_learn_intelex-2023.2.0-py37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c7361ac2fd913d9d735a26582f45d9addb9ef93b171eb514ba8d4a9fe209439 |
|
MD5 | ea15001cd1b93122ceae48fdc032457a |
|
BLAKE2b-256 | 1e0eb319e6bd9f10a10b62c808960a474a8e4cb0890864c40110f6a1e8b82e26 |
Hashes for scikit_learn_intelex-2023.2.0-py37-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c80a705df6da485755936c92da5507de8b6100e79a8ca0841bae67912dd2a9de |
|
MD5 | 01c94e4febb361774ee8747c90d84c21 |
|
BLAKE2b-256 | b2a8bf5e233325b39c9c46f7b0ff56bc83f5a0126ae1e8dcc19e7a8f28395ee2 |
Hashes for scikit_learn_intelex-2023.2.0-py37-none-macosx_10_15_x86_64.macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 038cf500f5f239c59e12500dd833532c50490e0d611339d4bd26881e0ccd923b |
|
MD5 | 949d20383446e8eafce16576a6232084 |
|
BLAKE2b-256 | 7d65df7b2a73ecca964396ef31aca760d162f0cd354717dfa4e22c9b28871410 |