Skip to main content

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*

Build Status Coverity Scan Build Status Join the community on GitHub Discussions PyPI Version Conda Version

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: CircleCI

👀 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:

🔗 Important links

💬 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

Benchmarks code

[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

Read more in the documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

scikit_learn_intelex-2021.5.3-py39-none-win_amd64.whl (76.3 kB view details)

Uploaded Python 3.9Windows x86-64

scikit_learn_intelex-2021.5.3-py38-none-win_amd64.whl (76.3 kB view details)

Uploaded Python 3.8Windows x86-64

scikit_learn_intelex-2021.5.3-py37-none-win_amd64.whl (76.3 kB view details)

Uploaded Python 3.7Windows x86-64

scikit_learn_intelex-2021.5.3-py36-none-win_amd64.whl (76.3 kB view details)

Uploaded Python 3.6Windows x86-64

File details

Details for the file scikit_learn_intelex-2021.5.3-py39-none-win_amd64.whl.

File metadata

  • Download URL: scikit_learn_intelex-2021.5.3-py39-none-win_amd64.whl
  • Upload date:
  • Size: 76.3 kB
  • Tags: Python 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.1 requests/2.26.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/2.7.17

File hashes

Hashes for scikit_learn_intelex-2021.5.3-py39-none-win_amd64.whl
Algorithm Hash digest
SHA256 79607e19d493df422bb434e6277029934cc55d4c83304d66e5c09815aab592c6
MD5 7252f9dd84e24ff9251a269d2652a914
BLAKE2b-256 579fef9f8bf9c2a0aa1fcdf024628fbc3bd25749fb1f594a6e24ef997bbf4964

See more details on using hashes here.

File details

Details for the file scikit_learn_intelex-2021.5.3-py39-none-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for scikit_learn_intelex-2021.5.3-py39-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0f27775cc65e9fe224c373163fe5630f58c98d860b507abd91ce92a6ad1b7edd
MD5 5b1b2fe8f6b33ced3da27db696820cb6
BLAKE2b-256 5d1bf3875270c51e867fc7abda02d58513088c553520e20fd550f52e9eb68dab

See more details on using hashes here.

File details

Details for the file scikit_learn_intelex-2021.5.3-py38-none-win_amd64.whl.

File metadata

  • Download URL: scikit_learn_intelex-2021.5.3-py38-none-win_amd64.whl
  • Upload date:
  • Size: 76.3 kB
  • Tags: Python 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.1 requests/2.26.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/2.7.17

File hashes

Hashes for scikit_learn_intelex-2021.5.3-py38-none-win_amd64.whl
Algorithm Hash digest
SHA256 a7d883a62c94831e3abe114771e3a9fadaeba1dbf61151cff8f836e6cea5c5aa
MD5 4a2e0d2f56f151d090b626cb10b28e0d
BLAKE2b-256 7b169d69e77f58eeba637845f98af59490578cec6abf5cb02ef14671147e9690

See more details on using hashes here.

File details

Details for the file scikit_learn_intelex-2021.5.3-py38-none-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for scikit_learn_intelex-2021.5.3-py38-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a2f57d8a88d20b6c17216a9ca406fd333ec5722eb2b07b4d6720dedefc126d2c
MD5 ec186dace6153a4b1da0948ac3e07167
BLAKE2b-256 723abcde1bb45a3d38f633d455428d6224a520d7ab08f8a7f5cbeda57cf19024

See more details on using hashes here.

File details

Details for the file scikit_learn_intelex-2021.5.3-py37-none-win_amd64.whl.

File metadata

  • Download URL: scikit_learn_intelex-2021.5.3-py37-none-win_amd64.whl
  • Upload date:
  • Size: 76.3 kB
  • Tags: Python 3.7, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.1 requests/2.26.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/2.7.17

File hashes

Hashes for scikit_learn_intelex-2021.5.3-py37-none-win_amd64.whl
Algorithm Hash digest
SHA256 f331b9aa81163913a1c8ab1f237b8a3afe88e5178e74530c05278d89e7071466
MD5 27841fc0f3539045e3d3cc7fbf9c84ba
BLAKE2b-256 e13d6dc2e5e90e3b7ee2997d8bd2845c95c574c57a4e41d55d35b4f893cc7842

See more details on using hashes here.

File details

Details for the file scikit_learn_intelex-2021.5.3-py37-none-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for scikit_learn_intelex-2021.5.3-py37-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 dfba15d74e823ddda4684596040a9b042c3ea6d6b78d9737ffba17136343ad51
MD5 57b14e25bbe37cce1fb0d31d3cbedbfc
BLAKE2b-256 702c356632fe8211db2e5d7aa12b900c29c09c40e8530dce47e86f987f736704

See more details on using hashes here.

File details

Details for the file scikit_learn_intelex-2021.5.3-py36-none-win_amd64.whl.

File metadata

  • Download URL: scikit_learn_intelex-2021.5.3-py36-none-win_amd64.whl
  • Upload date:
  • Size: 76.3 kB
  • Tags: Python 3.6, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.1 requests/2.26.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/2.7.17

File hashes

Hashes for scikit_learn_intelex-2021.5.3-py36-none-win_amd64.whl
Algorithm Hash digest
SHA256 7a84998fa7724855af5227ffe9fb1d25a917ed9f1237d6b5ddc21fdedcb30c0e
MD5 de4c30dd5ae6cc29a29033618ea15cca
BLAKE2b-256 e97d53a3534ee5f8e9682c9f136672ca2e34fe205910c7ec17dafba4fa6286ff

See more details on using hashes here.

File details

Details for the file scikit_learn_intelex-2021.5.3-py36-none-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for scikit_learn_intelex-2021.5.3-py36-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b58197423daf5cac821c6376ab702f445cfd72a964de6ff436b4ecc592b2ff6e
MD5 3f54e8fa2c1dfcabd15f5e5c1bc6e800
BLAKE2b-256 3ba727b9351d04f555d741aad5e07b9945f6b956cff2321f32df6c2572fc7cf9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page