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

With Intel(R) Extension for Scikit-learn you can accelerate your Scikit-learn applications and still have full conformance with all Scikit-Learn APIs and algorithms. This is a free software AI accelerator that brings over 10-100X acceleration across a variety of applications. And you do not even need to change the existing code!

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.

👀 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 config --add channels conda-forge
  conda config --set channel_priority strict
  conda install scikit-learn-intelex
  • Anaconda Cloud from Intel channel (recommended for Intel® Distribution for Python users)
  conda config --add channels intel
  conda config --set channel_priority strict
  conda install scikit-learn-intelex
[Click to expand] ℹ️ Supported configurations

📦 PyPi channel

OS / Python version Python 3.8 Python 3.9 Python 3.10 Python 3.11 Python 3.12
Linux [CPU, GPU] [CPU, GPU] [CPU, GPU] [CPU, GPU] [CPU, GPU]
Windows [CPU, GPU] [CPU, GPU] [CPU, GPU] [CPU, GPU] [CPU, GPU]

📦 Anaconda Cloud: Conda-Forge channel

OS / Python version Python 3.8 Python 3.9 Python 3.10 Python 3.11 Python 3.12
Linux [CPU] [CPU] [CPU] [CPU] [CPU]
Windows [CPU] [CPU] [CPU] [CPU] [CPU]

📦 Anaconda Cloud: Intel channel

OS / Python version Python 3.8 Python 3.9 Python 3.10 Python 3.11 Python 3.12
Linux [CPU, GPU] [CPU, GPU] [CPU, GPU] [CPU, GPU] [CPU, GPU]
Windows [CPU, GPU] [CPU, GPU] [CPU, GPU] [CPU, GPU] [CPU, GPU]

⚠️ 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
import dpctl
from sklearnex import patch_sklearn, config_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 config_context(target_offload="gpu:0"):
    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 scikit-learn-intelex-2024.0.X supports scikit-learn 1.0.X, 1.1.X, 1.2.X and 1.3.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: 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.4.0-py312-none-win_amd64.whl (153.4 kB view details)

Uploaded Python 3.12Windows x86-64

scikit_learn_intelex-2024.4.0-py311-none-win_amd64.whl (153.4 kB view details)

Uploaded Python 3.11Windows x86-64

scikit_learn_intelex-2024.4.0-py310-none-win_amd64.whl (153.4 kB view details)

Uploaded Python 3.10Windows x86-64

scikit_learn_intelex-2024.4.0-py39-none-win_amd64.whl (153.4 kB view details)

Uploaded Python 3.9Windows x86-64

scikit_learn_intelex-2024.4.0-py38-none-win_amd64.whl (153.4 kB view details)

Uploaded Python 3.8Windows x86-64

File details

Details for the file scikit_learn_intelex-2024.4.0-py312-none-win_amd64.whl.

File metadata

  • Download URL: scikit_learn_intelex-2024.4.0-py312-none-win_amd64.whl
  • Upload date:
  • Size: 153.4 kB
  • Tags: Python 3.12, 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.4.0-py312-none-win_amd64.whl
Algorithm Hash digest
SHA256 8adfa87dbefb170e344e57b868dee40e1b580a36235eeed40f2562bcf6758d86
MD5 4355223c91e79abda8a71b4fd66fa949
BLAKE2b-256 fc40fecfa5ddc8b3eac4ea4bc8e474e36315eb2ec934be6a72fd55a6a9226ab0

See more details on using hashes here.

File details

Details for the file scikit_learn_intelex-2024.4.0-py312-none-manylinux1_x86_64.whl.

File metadata

  • Download URL: scikit_learn_intelex-2024.4.0-py312-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 142.2 kB
  • Tags: Python 3.12
  • 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.4.0-py312-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e8238815040d6ce11aaabb2e7505110ade9bd4691f369753986fe86556517ec2
MD5 47ea4d75d6f3825aa7501e7cb6731dfd
BLAKE2b-256 6bd755b6ed2456744370be16cd527ca5f1553d0725bc431735d4c39354b65bb0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scikit_learn_intelex-2024.4.0-py311-none-win_amd64.whl
  • Upload date:
  • Size: 153.4 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.4.0-py311-none-win_amd64.whl
Algorithm Hash digest
SHA256 2f847cfa67c7d9b3ea23e62333ade283c29e6a09f2b377d8299964510a2bcef6
MD5 8151a30c9405d465e8a57ed809b078f2
BLAKE2b-256 332cb9e0cb219682f6fb31c49f1293110c1645d23406a2af897802a8b2a93be2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scikit_learn_intelex-2024.4.0-py311-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 142.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.4.0-py311-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 d522fef57cbaeb924b365f8e63eaac8d75b5aa36b3b3540dfd9f6576ddb09dbe
MD5 ff458ed08ba3b9ce311e34f3598f4913
BLAKE2b-256 aabbd1c9e391b24e9a5fa3b6029257db5a302adc036c2da929d80d1a5ba482f4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scikit_learn_intelex-2024.4.0-py310-none-win_amd64.whl
  • Upload date:
  • Size: 153.4 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.4.0-py310-none-win_amd64.whl
Algorithm Hash digest
SHA256 01190ab5bede2752e2fac47e6d83d66c1188112368adc94628e4c67d559eb86b
MD5 3f45e25f183f1287f5a1b31afbd6c435
BLAKE2b-256 e37d84c89de76f5db8b091fcad0de1695918abd69c8a0f277fec3600cef6d9b0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scikit_learn_intelex-2024.4.0-py310-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 142.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.4.0-py310-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 281acd2ca71e13f474340ccaf3e27c30e12ccd36b084531f8beb4977fd25a649
MD5 bd897be9e9485aaa73046957a497276d
BLAKE2b-256 6eb7a5c00c68d7370bdc65ce6a2ec4963e317b272b8cd9c1aa05b938e3aaad12

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scikit_learn_intelex-2024.4.0-py39-none-win_amd64.whl
  • Upload date:
  • Size: 153.4 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.4.0-py39-none-win_amd64.whl
Algorithm Hash digest
SHA256 452b96200587b5c9d21ad7620f621daa1f26993aab4bc0977f2aeca9ebd4bf68
MD5 b08123ca8b2cba75acb1d19a1d828461
BLAKE2b-256 33e0fbe58bc1e706acca3829c562fa5d5dbc8d6f08b5f6b1fade7ba3e1bda4d4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scikit_learn_intelex-2024.4.0-py39-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 142.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.4.0-py39-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8044f65db0d2b0610c3a4e135328dad598dfb2aa5331ef724531a0360e59b999
MD5 2c7bfaac6df8c2c534719574a6438cf6
BLAKE2b-256 0fcc6982ad2fea59eabdc79d51b41c66fafd50b5b48682609785f283c617ba35

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scikit_learn_intelex-2024.4.0-py38-none-win_amd64.whl
  • Upload date:
  • Size: 153.4 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.4.0-py38-none-win_amd64.whl
Algorithm Hash digest
SHA256 a9b56045215f338ca6b628ffeab8ede7d4d1faf4f284df6de9534d1d66912b7c
MD5 126aa428819ff8bfd39ea828884489d0
BLAKE2b-256 cf8bab3513a30a4325ff6bfa2e53e38f4bddefac4e03ddc181942a4869eb17eb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scikit_learn_intelex-2024.4.0-py38-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 142.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.4.0-py38-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 06151bc36fb6156910aa022c47732645fe37e4a71fc96c386ea8dcea685f4ebf
MD5 e3a43c8aa6c6ce89d4dfe65e459f2377
BLAKE2b-256 5e06ed7e8f66595295969d995fab08dd4d3969747cf71a2718ba849295b0387e

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