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-2021.6.0-py38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e324414dce1cc8ebbbc7b6fbdeb50f4a0729136d7a0b19156d32798bc046bf2f |
|
MD5 | 0cd30e8f5b6f30e60d0da3431ec76f1e |
|
BLAKE2b-256 | c50afebd1b978cf67e6f502be717adf3d24e8e612cd0bb040ccc71657e5182c5 |
Hashes for scikit_learn_intelex-2021.6.0-py38-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4deab95cd76be80ad58f432dc099bf3202704171f579efa2a8247e2abf5374a6 |
|
MD5 | 7f0dfc77db0d27b638c63242ada98d90 |
|
BLAKE2b-256 | 07af380762333c686ac77c6639b9b230bd33e9f57f7ee264447949158ac1385c |
Hashes for scikit_learn_intelex-2021.6.0-py38-none-macosx_10_15_x86_64.macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33a2eda3abe3bac2a463510f3726f3aa89b8d82e91935b93a96dcac0a05ea632 |
|
MD5 | 7ba6634609db9edc8b5d769e79c8b34d |
|
BLAKE2b-256 | c9d5ee1cad3d8a5879c6cffc82032c9912f4b7c98b227cbbb2148456e30c2cb3 |
Hashes for scikit_learn_intelex-2021.6.0-py37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bfaf5ec8772ccb2955b3566b637a83ca4fce1b9872b36ea9878a08a8b26ab1e |
|
MD5 | c87099cb112161c0c36258a249f4d77d |
|
BLAKE2b-256 | fbefd5a8b0145647d2692a1c25b38dc446b372b4bf651b642e908aebf66eceec |
Hashes for scikit_learn_intelex-2021.6.0-py37-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ba70e3e4a404276ae5ce0c50844967589053242db742f251a55db605038839d |
|
MD5 | dd5993590db30ff35becfe84c30e3f1d |
|
BLAKE2b-256 | a8a3ad59f295af08ec01f26bd9ded7bf677b559abbedc78a217463caff8d2046 |
Hashes for scikit_learn_intelex-2021.6.0-py37-none-macosx_10_15_x86_64.macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 139c52efc7b66f6234d1a2f0cf7f17de568247a8e1526f34f1ea2981a36f85a7 |
|
MD5 | 6fb10b7271ffc5b011f5e38400b89f4d |
|
BLAKE2b-256 | cd7f5b1da824ab9bc6d193956fb2d10196e3b13835bc63e4eedf99ea61eee4c2 |
Hashes for scikit_learn_intelex-2021.6.0-2-py310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 753639661f1b643e9e095ec1ff244ec86abc53cea19e315296a81641f3e65349 |
|
MD5 | 6e7f74776dd998a981b270f71f87eb4e |
|
BLAKE2b-256 | 4892657f6a2bd476ac495ce7838553e8f2c95d21972d2c117c812ffe22e62b49 |
Hashes for scikit_learn_intelex-2021.6.0-2-py310-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72e9068c24054ca74874688d85f19cde9ac060a645a5ff4da53894fb437b6067 |
|
MD5 | d045f8a5d501e5a17ab5a825ff231a33 |
|
BLAKE2b-256 | 0d5137cbf4ab567beea66951a6b33d6a1c1234283a14e7d7223107d6c01540b7 |
Hashes for scikit_learn_intelex-2021.6.0-2-py310-none-macosx_10_15_x86_64.macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29152d0109eda095a83d7d542a9a82945a10cdc224d20e9b276cda45e8fb02e2 |
|
MD5 | 9a88d25f4273f08a173bc7e79db837c4 |
|
BLAKE2b-256 | 796678a080df69816e0aed4596b03de246b8acbe46760e357015d68106cfee08 |
Hashes for scikit_learn_intelex-2021.6.0-2-py39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6637c88b8151a9a8ae04b7f7195135944f01324a733aa22eea23c204a71d7be9 |
|
MD5 | 33c4b4ebb955f1a4983d908f239efdf7 |
|
BLAKE2b-256 | fe37fdaff38517cb8b0b843353662e6792070b0d05d26fc10524681b02ef2461 |
Hashes for scikit_learn_intelex-2021.6.0-2-py39-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c83a5eedd126668dae784b3852bd23e3ac142e86e54eaf616a84da453f2a39c |
|
MD5 | f9d0b9a8cef639b72188fbddc8f8b321 |
|
BLAKE2b-256 | 5c7db60499dce9713cbab69c37797c14c264a8fbb6db2bc56e9191875b5865c5 |
Hashes for scikit_learn_intelex-2021.6.0-2-py39-none-macosx_10_15_x86_64.macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d2c3bdad0a8a55fa83ac401ee68966a4e11cf7dead9ee260c6db2dce4731922 |
|
MD5 | 6030d2fc879f8c3c19a4bfee5c9d10ed |
|
BLAKE2b-256 | 9b3d1443a0a436774aed57ba01e81abe23f1b70a5f9c3682f00b51d8ac10685c |
Hashes for scikit_learn_intelex-2021.6.0-2-py38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 472a2e7b9d90fbe66521c91fc644b5efbb981baa42e816992525efc476fa8558 |
|
MD5 | 8af94904f7d774f43ba45d545084900b |
|
BLAKE2b-256 | 80fef409209513b355fb4a95a84af2f28afe556e4f4df93e842dfdafdd01a0f3 |
Hashes for scikit_learn_intelex-2021.6.0-2-py38-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ec51c33748c403243b7104aeb3b36f1d5a61d73aeb57248b465193946c05c88 |
|
MD5 | 8ab7bb73955cf7409c3b80703d11afc2 |
|
BLAKE2b-256 | c63eba072a232ae1392cbeff16f13fd3cb3fdd7419421de9136dc817cf5b4ec6 |
Hashes for scikit_learn_intelex-2021.6.0-2-py38-none-macosx_10_15_x86_64.macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 402f9f0fa8906cf3683fa517152c86444477cab6d9b1be62d08b859a9584560d |
|
MD5 | 3256a1b2e9a33ad2ba9a88de21c778e5 |
|
BLAKE2b-256 | 7420c9db749076adffff723bd2fa3eae1fa37cbeb78f78eaa401c89bc8ac47c4 |
Hashes for scikit_learn_intelex-2021.6.0-2-py37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbac156fd26db32df38e2bc8bdbb90ac3ce88692c891542a8806d318c10f1c56 |
|
MD5 | 7c9ed3b9115ed39139ec21f159703d04 |
|
BLAKE2b-256 | fd39bdd2abf125c8929e98961760850453ab633cc774c388c2d5c0a4ded83612 |
Hashes for scikit_learn_intelex-2021.6.0-2-py37-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14d4d32f7e330ce8f87c583b4ec511816cb7a1e12e0a607f3e5905a9aa84714b |
|
MD5 | 46a4f1710bac679b598ff3f963bbbad3 |
|
BLAKE2b-256 | ab6d26290137c126a8618a3b41cf9ca77d9dc7761d8ccca27e9b00ac1a924427 |
Hashes for scikit_learn_intelex-2021.6.0-2-py37-none-macosx_10_15_x86_64.macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bf18443d400c8e50a01b312f850ee8745b5a9b1b2ef6ea8aaaffc010ef42b73 |
|
MD5 | c3263167890fce24e04841f0e1aad6cb |
|
BLAKE2b-256 | b5aba8d19582a5eb11519689af750c1c3f99991107627a1bc72aeec5b4246e6b |
Hashes for scikit_learn_intelex-2021.6.0-1-py39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d62d9dfc0382520d622ab7af4ba198b44f0b21ef2b9256985a6b14f7a48f9c3f |
|
MD5 | 4391dc3f26023b11a806a94aca243e52 |
|
BLAKE2b-256 | 38121c5eef7449b62f6245ae0e3223b8d7efb12f85436616526785f1f7af64d8 |
Hashes for scikit_learn_intelex-2021.6.0-1-py39-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e184d9de95a8eace7746273ed696ecb6d8f898c77f4cb5ddc1061a485b1ee87d |
|
MD5 | a088dd4e20a2c954f9496aee63ac374b |
|
BLAKE2b-256 | d66b2c6e5adb380f776201b154c57bbf85daaa46d8ba088bbce454034a426c2e |
Hashes for scikit_learn_intelex-2021.6.0-1-py39-none-macosx_10_15_x86_64.macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de1f5379963826ac6384741f50b3c906b0f37c05d48807649d56ff6d999f4ca3 |
|
MD5 | 470daf33a9cdc1ebcaeef9c6a75ed887 |
|
BLAKE2b-256 | e8853eae06737cf91eb3f7cbae56a6d84957b6adb2b6d2650a0bab5b46fe0f3b |