Skip to main content

Intel® oneAPI Data Analytics Library

Project description

daal4py - A Convenient Python API to the Intel(R) oneAPI Data Analytics Library

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

A simplified API to Intel(R) oneAPI Data Analytics Library that allows for fast usage of the framework suited for Data Scientists or Machine Learning users. Built to help provide an abstraction to Intel(R) oneAPI Data Analytics Library for either direct usage or integration into one's own framework and extending this beyond by providing drop-in paching for scikit-learn.

Running full scikit-learn test suite with daal4py optimization patches:

  • CircleCI when applied to scikit-learn from PyPi
  • CircleCI when applied to build from master branch

👀 Follow us on Medium

We publish blogs on Medium, so follow us to learn tips and tricks for more efficient data analysis the help of daal4py. 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

daal4py is available at the Python Package Index, on Anaconda Cloud in Conda-Forge channel and in Intel channel.

# PyPi
pip install daal4py
# Anaconda Cloud from Conda-Forge channel (recommended for conda users by default)
conda install daal4py -c conda-forge
# Anaconda Cloud from Intel channel (recommended for Intel® Distribution for Python)
conda install daal4py -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] [CPU, GPU]
Windows [CPU, GPU] [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

📦 Anaconda Cloud: Intel channel

OS / Python version Python 3.6 Python 3.7 Python 3.8 Python 3.9
Linux [CPU, GPU]
Windows [CPU, GPU]
OsX [CPU]

You can build daal4py from sources as well.

⚡️ Get Started

Accelerate scikit-learn with the core functionality of daal4py without changing the code.

Intel CPU optimizations patching

import numpy as np
from daal4py.sklearn 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 CPU/GPU optimizations patching

import numpy as np
from daal4py.sklearn 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

Speedups of daal4py-powered Scikit-learn over the original Scikit-learn
Technical details: float type: float64; HW: Intel(R) Xeon(R) Platinum 8280 CPU @ 2.70GHz, 2 sockets, 28 cores per socket; SW: scikit-learn 0.23.1, Intel® oneDAl (2021.1 Beta 10)

daal4py patching affects performance of specific Scikit-learn functionality listed below. In cases when unsupported parameters are used, daal4py fallbacks into stock Scikit-learn. These limitations described below. 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 daal4py-2021.1 supports scikit-learn 0.21.X, 0.22.X, 0.23.X and 0.24.X.

[Click to expand] 🔥 Applying the daal4py patch will impact the following existing scikit-learn algorithms:
Task Functionality Parameters support Data support
Classification SVC All parameters except kernel = 'poly' and 'sigmoid'. No limitations.
RandomForestClassifier All parameters except warmstart = True and cpp_alpha != 0, criterion != 'gini'. Multi-output and sparse data is not supported.
KNeighborsClassifier All parameters except metric != 'euclidean' or minkowski with p = 2. Multi-output and sparse data is not supported.
LogisticRegression / LogisticRegressionCV All parameters except solver != 'lbfgs' or 'newton-cg', class_weight != None, sample_weight != None. Only dense data is supported.
Regression RandomForestRegressor All parameters except warmstart = True and cpp_alpha != 0, criterion != 'mse'. Multi-output and sparse data is not supported.
KNeighborsRegressor All parameters except metric != 'euclidean' or minkowski with p = 2. Sparse data is not supported.
LinearRegression All parameters except normalize != False and sample_weight != None. Only dense data is supported, #observations should be >= #features.
Ridge All parameters except normalize != False, solver != 'auto' and sample_weight != None. Only dense data is supported, #observations should be >= #features.
ElasticNet All parameters except sample_weight != None. Multi-output and sparse data is not supported, #observations should be >= #features.
Lasso All parameters except sample_weight != None. Multi-output and sparse data is not supported, #observations should be >= #features.
Clustering KMeans All parameters except precompute_distances and sample_weight != None. No limitations.
DBSCAN All parameters except metric != 'euclidean' or minkowski with p = 2. Only dense data is supported.
Dimensionality reduction PCA All parameters except svd_solver != 'full'. No limitations.
TSNE All parameters except metric != 'euclidean' or minkowski with p = 2. Sparse data is not supported.
Unsupervised NearestNeighbors All parameters except metric != 'euclidean' or minkowski with p = 2. Sparse data is not supported.
Other train_test_split All parameters are supported. Only dense data is supported.
assert_all_finite All parameters are supported. Only dense data is supported.
pairwise_distance With metric='cosine' and 'correlation'. Only dense data is supported.

Scenarios that are only available in the master branch (not released yet):

Task Functionality Parameters support Data support
Other roc_auc_score Parameters average, sample_weight, max_fpr and multi_class are not supported. No limitations.

📜 scikit-learn verbose

To find out which implementation of the algorithm is currently used (daal4py or stock Scikit-learn), set the environment variable:

  • On Linux and Mac OS: export IDP_SKLEARN_VERBOSE=INFO
  • On Windows: set IDP_SKLEARN_VERBOSE=INFO

For example, for DBSCAN you get one of these print statements depending on which implementation is used:

  • INFO: sklearn.cluster.DBSCAN.fit: uses Intel(R) oneAPI Data Analytics Library solver
  • INFO: sklearn.cluster.DBSCAN.fit: uses original Scikit-learn solver

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.

daal4py-2021.2.0-py38-none-win_amd64.whl (11.1 MB view details)

Uploaded Python 3.8Windows x86-64

daal4py-2021.2.0-py38-none-manylinux1_x86_64.whl (13.6 MB view details)

Uploaded Python 3.8

daal4py-2021.2.0-py38-none-macosx_10_15_x86_64.whl (2.5 MB view details)

Uploaded Python 3.8macOS 10.15+ x86-64

daal4py-2021.2.0-py37-none-win_amd64.whl (11.0 MB view details)

Uploaded Python 3.7Windows x86-64

daal4py-2021.2.0-py37-none-manylinux1_x86_64.whl (13.6 MB view details)

Uploaded Python 3.7

daal4py-2021.2.0-py37-none-macosx_10_15_x86_64.whl (2.5 MB view details)

Uploaded Python 3.7macOS 10.15+ x86-64

daal4py-2021.2.0-py36-none-win_amd64.whl (11.0 MB view details)

Uploaded Python 3.6Windows x86-64

daal4py-2021.2.0-py36-none-manylinux1_x86_64.whl (13.6 MB view details)

Uploaded Python 3.6

daal4py-2021.2.0-py36-none-macosx_10_15_x86_64.whl (2.5 MB view details)

Uploaded Python 3.6macOS 10.15+ x86-64

File details

Details for the file daal4py-2021.2.0-py38-none-win_amd64.whl.

File metadata

  • Download URL: daal4py-2021.2.0-py38-none-win_amd64.whl
  • Upload date:
  • Size: 11.1 MB
  • Tags: Python 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/2.7.9

File hashes

Hashes for daal4py-2021.2.0-py38-none-win_amd64.whl
Algorithm Hash digest
SHA256 21540e2a2316dfbd8c39c4d80ccb8a71575f9155ce7912dd9de89de0c52c6828
MD5 318dd7e661463bd18da0a835489bdbd4
BLAKE2b-256 e8a9902d13a024c83e8e28421cf4e1c196b327766e203d73800292e66a12f5ec

See more details on using hashes here.

File details

Details for the file daal4py-2021.2.0-py38-none-manylinux1_x86_64.whl.

File metadata

  • Download URL: daal4py-2021.2.0-py38-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 13.6 MB
  • Tags: Python 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/2.7.9

File hashes

Hashes for daal4py-2021.2.0-py38-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 6f5c1d3170dd8e24705df6846640a36d082af8cfaee21c961a5f71fb2dd3f410
MD5 3c1286690583f812848f76d546e3e3ef
BLAKE2b-256 b76a632b662f33dd9558a41c31ddb06cd596cba6b01c6b26ca6d919fe4e15035

See more details on using hashes here.

File details

Details for the file daal4py-2021.2.0-py38-none-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: daal4py-2021.2.0-py38-none-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: Python 3.8, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/2.7.9

File hashes

Hashes for daal4py-2021.2.0-py38-none-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 392c1ace8706e824e77aca9e334346408da3597f739a537ce584ec5164748112
MD5 83037e22eba99130894d820ac0251e6d
BLAKE2b-256 7c66885410530053c61168115e5a5d921c90c77959484930568c1535084290b6

See more details on using hashes here.

File details

Details for the file daal4py-2021.2.0-py37-none-win_amd64.whl.

File metadata

  • Download URL: daal4py-2021.2.0-py37-none-win_amd64.whl
  • Upload date:
  • Size: 11.0 MB
  • Tags: Python 3.7, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/2.7.9

File hashes

Hashes for daal4py-2021.2.0-py37-none-win_amd64.whl
Algorithm Hash digest
SHA256 e8dfa9a4768c82f8faf58ffbbe7442b3e3cc156c56d32b96700eda22a66897ad
MD5 edeef35992910df3b358e03e64815c5e
BLAKE2b-256 baa4ef7353685fe82fbdd0bf715a52d6319766786f708813959931475cf35c5f

See more details on using hashes here.

File details

Details for the file daal4py-2021.2.0-py37-none-manylinux1_x86_64.whl.

File metadata

  • Download URL: daal4py-2021.2.0-py37-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 13.6 MB
  • Tags: Python 3.7
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/2.7.9

File hashes

Hashes for daal4py-2021.2.0-py37-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b6d22f8c1786128492a1093d5fe4bf44ed7e48d49f4824c0de3f111a8a95f171
MD5 c952194505b65912661a35cf854954c3
BLAKE2b-256 8efe5d1afe9baa315a48d8b9e97d79985f02a8b6c3d1f8193ffd41c75b994c1a

See more details on using hashes here.

File details

Details for the file daal4py-2021.2.0-py37-none-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: daal4py-2021.2.0-py37-none-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: Python 3.7, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/2.7.9

File hashes

Hashes for daal4py-2021.2.0-py37-none-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 0b77ec91644394d44e8ac0910691792a652a47d8a4d4948785189bf2d95dda66
MD5 ace4a4f898e8ae7521058e9697f25658
BLAKE2b-256 c445d5bea760429f974f1c9a2b08e0658905f9c5a1b7c8a16b26232e88329c79

See more details on using hashes here.

File details

Details for the file daal4py-2021.2.0-py36-none-win_amd64.whl.

File metadata

  • Download URL: daal4py-2021.2.0-py36-none-win_amd64.whl
  • Upload date:
  • Size: 11.0 MB
  • Tags: Python 3.6, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/2.7.9

File hashes

Hashes for daal4py-2021.2.0-py36-none-win_amd64.whl
Algorithm Hash digest
SHA256 5e9407d100e2713215f29cac9f31f2d20cfb052bce25014bfa0346cb895929af
MD5 948b88673e39709b06389174a34b943c
BLAKE2b-256 bfa4d0d2d11951598d4ea7a362ababcad15ea7152936cb8c0bec990ce8e31289

See more details on using hashes here.

File details

Details for the file daal4py-2021.2.0-py36-none-manylinux1_x86_64.whl.

File metadata

  • Download URL: daal4py-2021.2.0-py36-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 13.6 MB
  • Tags: Python 3.6
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/2.7.9

File hashes

Hashes for daal4py-2021.2.0-py36-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 dfbba54962bbb6a2adae74e850431861f4e7e52d95b8fadd5c038d51acec90cf
MD5 c1efa12bfc98fd5d8461d8d46eae6f00
BLAKE2b-256 d8f7794a3f9f81b6f845a62d34476eb156574e51caf172d5b0d0798f64794557

See more details on using hashes here.

File details

Details for the file daal4py-2021.2.0-py36-none-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: daal4py-2021.2.0-py36-none-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: Python 3.6, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/2.7.9

File hashes

Hashes for daal4py-2021.2.0-py36-none-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 7aa5c61f2963b9dd1ed26b6e361a2d9d6df64ccdd787363aa535606ff150ba94
MD5 a8fe02dd351ba8174646d631334bf420
BLAKE2b-256 5c1f50997b21c70a78f482279d8a6b9fb5958da3f0aae4f0d9c4edb9b2e5e164

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