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.1.1-py311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcc2a337f45c6487a43051ac50949997d4a975d92b1494e190a93669936e3e07 |
|
MD5 | 7d695822f246230bbc58aaa4c4ec99d9 |
|
BLAKE2b-256 | 194289a000865a3439603d4eb0a18ba6536001e91b43732935797ae2286abe47 |
Hashes for scikit_learn_intelex-2023.1.1-py311-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c01fe72e39cb1a1d7dfa850e1a6b4a1223ba7e316bcf9924f4eca05657fe89e9 |
|
MD5 | 586036a616744eadac3c08490e4a03ea |
|
BLAKE2b-256 | ed5bf60d6f0ebbbb41e8acfa85eaf40b4e55ba9639efd8d144311c8e7f232fc7 |
Hashes for scikit_learn_intelex-2023.1.1-py311-none-macosx_10_15_x86_64.macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8dcc92cfac3659d43522ef6d083812e6d8f22b0ae126fee9d5c4b797e3eb01b8 |
|
MD5 | 555f0ebad33bf28b72e1174bd1e7b4a0 |
|
BLAKE2b-256 | 0c136de2ce0afc86db24a2ae4da29608f7b4e8f826ed6528226a843e682f9abe |
Hashes for scikit_learn_intelex-2023.1.1-py310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c518e2be27240ee866fb92b17c9f3181f8ac10925001d6ddfd5e947143e484c |
|
MD5 | 73115b68c33265f97ccb77fb207d9793 |
|
BLAKE2b-256 | 8d07f9ecf789f904d92cbfa55641ec5223190ffb48230b8d6efd192ddd895457 |
Hashes for scikit_learn_intelex-2023.1.1-py310-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c11b50888d68087ec26e0fd39339eab82a1e68ed1c892f34ce1e9bc13aff3b7f |
|
MD5 | e05e634cdfaca01432e31688cfd74217 |
|
BLAKE2b-256 | 42eac8e6f51fc05831017d9f4a15829ff6cfa15d38d2a12168bfdf0b43067984 |
Hashes for scikit_learn_intelex-2023.1.1-py310-none-macosx_10_15_x86_64.macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a813f797fbfd6c3d4fcea4d1c517a68da517e02de26de2fa68722e76c8f85f9 |
|
MD5 | ad74e6c306aa0ae16a66a44acaf6123b |
|
BLAKE2b-256 | 05378e8effe211cc05d37b3b6406d527327ebbd0bcce6f8096e1dfc8e28cfe01 |
Hashes for scikit_learn_intelex-2023.1.1-py39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac3569c3d60453a3e0407423dde6df1a5dbc6a7f0c374a2266ef407c23851fdb |
|
MD5 | a818b587b0fddd16339f5e3e96f11c0b |
|
BLAKE2b-256 | 60d6e576a94b9f2f1f7cfc1400fafe7637a6e6d7fa11514d4310799005fec58f |
Hashes for scikit_learn_intelex-2023.1.1-py39-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52594fff27b30e3d310ac86481c89720a09b9b20e1c8989ead7f0200510d64ee |
|
MD5 | 76e833718fbb9ed661f18bca2dc2d0c4 |
|
BLAKE2b-256 | 74ed23ab93e5fa7c61dd0ceb637cdd408b7c1c95e87b72546898d304f16bd529 |
Hashes for scikit_learn_intelex-2023.1.1-py39-none-macosx_10_15_x86_64.macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc5d184d45f6092db2f4a0ab574ed3213b176c232d2467793038b0c004d74503 |
|
MD5 | bbd94f7cf64e150e463fd11bfbafd6fc |
|
BLAKE2b-256 | 5bc350889937da256a98dfe80d8155a15cf94cfe84be298ebca89808557175a0 |
Hashes for scikit_learn_intelex-2023.1.1-py38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a90a88e914ce454357614172cbc697823e6d7a5e1d1758651dca181ab1d02047 |
|
MD5 | 4176b818ad4eec0c26a484a82796a80b |
|
BLAKE2b-256 | ba8c5a04546baacaff33ffbe66f28292632ac939d2a9162ab1ee79b97cacf7aa |
Hashes for scikit_learn_intelex-2023.1.1-py38-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfae879e9c2150a6dc4c7b79c4d64755285beb421b4946686cc172e098f17bf3 |
|
MD5 | c4dd3b370192eacc28e70386d69a78a5 |
|
BLAKE2b-256 | ab542e98b7acae7e875c7510701f0996f7b1264ecb1938673897794c5d8f2090 |
Hashes for scikit_learn_intelex-2023.1.1-py38-none-macosx_10_15_x86_64.macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 083b856581cc878fac6c6b66e1f4d708465a7d1811de6793f95a540a05c7865d |
|
MD5 | d4b72aa1019a30902a895770899d3767 |
|
BLAKE2b-256 | 28f91e0ef2bc379d100f85b02e70284f37e3446ff455d4a82d0cd56955114c76 |
Hashes for scikit_learn_intelex-2023.1.1-py37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 837e50d1f0c309079cd746e66c4f543b7a52018e8ba326291c956c2b7ad2b9a1 |
|
MD5 | 5b94c46c08e7efc118c2121720401027 |
|
BLAKE2b-256 | bcc50730046bdf747e37f47848a6834838be751930a0abfdafe653e8980c052d |
Hashes for scikit_learn_intelex-2023.1.1-py37-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d99f067c08f1620f05c770c29bdfbd5c24e9bc6371f7083de11486611990ee6 |
|
MD5 | de67e6baac5b488f70398a0cc9c16672 |
|
BLAKE2b-256 | d90c3641bc2db48d2ecd9fcf7f0d42aaceabf4f4e2fba184cfce072538d09d43 |
Hashes for scikit_learn_intelex-2023.1.1-py37-none-macosx_10_15_x86_64.macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 614b8951914df402b04714230ca1ee3c4bceeaf2b5361cf7eb6c89ec40b13fba |
|
MD5 | 3050abd772d5cd0a0fe9c39b26b5fbad |
|
BLAKE2b-256 | 29c7d53d3ca37b53f36fde6c9c7b219b8d59389fbd19cb7d2daebb7741a667e3 |