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-2024.0.0-py311-none-win_amd64.whl (147.1 kB view details)

Uploaded Python 3.11Windows x86-64

scikit_learn_intelex-2024.0.0-py310-none-win_amd64.whl (147.1 kB view details)

Uploaded Python 3.10Windows x86-64

scikit_learn_intelex-2024.0.0-py39-none-win_amd64.whl (147.1 kB view details)

Uploaded Python 3.9Windows x86-64

scikit_learn_intelex-2024.0.0-py38-none-win_amd64.whl (147.1 kB view details)

Uploaded Python 3.8Windows x86-64

File details

Details for the file scikit_learn_intelex-2024.0.0-py311-none-win_amd64.whl.

File metadata

  • Download URL: scikit_learn_intelex-2024.0.0-py311-none-win_amd64.whl
  • Upload date:
  • Size: 147.1 kB
  • 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.31.0 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6

File hashes

Hashes for scikit_learn_intelex-2024.0.0-py311-none-win_amd64.whl
Algorithm Hash digest
SHA256 09371238124bf0686488437de44914e5db677c421098e5783890202f5c4d6550
MD5 85aab8b9070210ce2a834884273e5c4e
BLAKE2b-256 59de1eb2781437a7faebeb35866681197e200c705987272a6e2ceabc8a4e1327

See more details on using hashes here.

File details

Details for the file scikit_learn_intelex-2024.0.0-py311-none-manylinux1_x86_64.whl.

File metadata

  • Download URL: scikit_learn_intelex-2024.0.0-py311-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 136.2 kB
  • Tags: Python 3.11
  • 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.31.0 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6

File hashes

Hashes for scikit_learn_intelex-2024.0.0-py311-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a308533c31ecfdb7627fb88615023a54294f7a79c195fe9cc37f2a4ba12c6185
MD5 6921a2f319782206d2ffa3c28c73759f
BLAKE2b-256 8b0ba033fa7581c3b9b5be3f69c2a2c43946bd0017c664a41f507cc6adc5eeed

See more details on using hashes here.

File details

Details for the file scikit_learn_intelex-2024.0.0-py310-none-win_amd64.whl.

File metadata

  • Download URL: scikit_learn_intelex-2024.0.0-py310-none-win_amd64.whl
  • Upload date:
  • Size: 147.1 kB
  • 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.31.0 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6

File hashes

Hashes for scikit_learn_intelex-2024.0.0-py310-none-win_amd64.whl
Algorithm Hash digest
SHA256 8e89d339ee0dda3ae6222d633877cc3e1cb9ed32d83021bbd84ca1f27d337c46
MD5 9400f8f5a020b0a99febee567dbbd204
BLAKE2b-256 f9b8b9c4d66e48ca423766d0826bac05dad4f8567026291db648318182169529

See more details on using hashes here.

File details

Details for the file scikit_learn_intelex-2024.0.0-py310-none-manylinux1_x86_64.whl.

File metadata

  • Download URL: scikit_learn_intelex-2024.0.0-py310-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 136.2 kB
  • Tags: Python 3.10
  • 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.31.0 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6

File hashes

Hashes for scikit_learn_intelex-2024.0.0-py310-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e1ee165622689a477d3d03658934ab95479352a96d67840a55da6ba2f75bc99b
MD5 bf0f927f7cb83810fcbd6c5c52539f00
BLAKE2b-256 ef787b63ff472ee359ddc87bfd107794b1e1acce77caf4522b911c43b29d8606

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scikit_learn_intelex-2024.0.0-py39-none-win_amd64.whl
  • Upload date:
  • Size: 147.1 kB
  • 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.31.0 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6

File hashes

Hashes for scikit_learn_intelex-2024.0.0-py39-none-win_amd64.whl
Algorithm Hash digest
SHA256 4fe2a04254bbf6f4d9002d3269eb4f5f99fff77411c5f6758aeead724e68214c
MD5 9730e4939a8141cbc0f991ce3d8dfad5
BLAKE2b-256 7d7ae7b95ec70859b082591f2c99377cf5fa1657270d1d598957270000a87f87

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scikit_learn_intelex-2024.0.0-py39-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 136.2 kB
  • Tags: Python 3.9
  • 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.31.0 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6

File hashes

Hashes for scikit_learn_intelex-2024.0.0-py39-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a640e60a56f9256b9bad6dd8bd69e752847931c2e9dd32ac38d5b5d46adb3cda
MD5 7541bcfa264ec9e5619e4056560f87d8
BLAKE2b-256 76cabdd4a27201867f5bd78ee2cf15859ad53d0dd696499947c25e9f462fc4fc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scikit_learn_intelex-2024.0.0-py38-none-win_amd64.whl
  • Upload date:
  • Size: 147.1 kB
  • Tags: Python 3.8, 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.31.0 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6

File hashes

Hashes for scikit_learn_intelex-2024.0.0-py38-none-win_amd64.whl
Algorithm Hash digest
SHA256 35f52009110616ed03b1be95ac9426963109f3c6e801b19a439b03f1d8162e2c
MD5 17d1539afe9c165a48a37c979fcc9c71
BLAKE2b-256 e1bed35c12e3e224d7c34f5668df818ffc0693072a847e58566b720f542a57ef

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scikit_learn_intelex-2024.0.0-py38-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 136.2 kB
  • Tags: Python 3.8
  • 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.31.0 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6

File hashes

Hashes for scikit_learn_intelex-2024.0.0-py38-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ce1381d11c17a32f6b3fc8a6a9758278724d9a7d5cef13105845d71a3643e1c3
MD5 52cb3d4a2eb26e1f78543cc2720a6e2d
BLAKE2b-256 c544be8c24e54b2d7e1de920f5cbe2994218ca4a0ac534d7224f429e59fd3d6d

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