Skip to main content

PyZSS AOCL Data Analytics scikit-learn Extension and Python Interfaces

Project description

The latest AMD plugin for scikit-learn is here!

AMD’s AOCL Data Analytics Library provides optimized building blocks for data analysis and classical machine learning applications. The package leverages the AMD optimizing CPU libraries (AOCL) to provide outstanding performance, not just on AMD processors but on other x86 hardware too.

Existing scikit-learn users can benefit from the performance of the AOCL Data Analytics Library without making any code changes, by simply patching existing scikit-learn code so that it automatically calls the library. The AOCL Data Analytics Library also comes with additional Python APIs, providing access to algorithms not included in scikit-learn, such as nonlinear least squares optimization.

Installation

The easiest way to access the AOCL Data Analytics Library is via the pip install command, which will download and install an appropriate wheel directly from PyPI.

Python wheels can also be downloaded directly from AMD’s AOCL-DA page and installed using pip.

For Linux users, Python packages can also be downloaded and built using Spack.

The AOCL Data Analytics Source code and compilation instructions are available at https://github.com/amd/aocl-data-analytics/.

Using the scikit-learn extension

Existing scikit-learn users can patch code to replace the scikit-learn symbols with AOCL Data Analytics symbols. This can be done by inserting the following lines prior to the scikit-learn import statement.

from aoclda.sklearn import skpatch, undo_skpatch
skpatch()

You can switch back to standard scikit-learn using

undo_skpatch()

Note that after calling undo_skpatch, you must reimport scikit-learn.

The skpatch and undo_skpatch functions can also be called with string or list arguments, specifying which scikit-learn package should be patched, for example:

skpatch("PCA")
skpatch(["LinearRegression", "Ridge"])

Alternatively, you may wish to use the aoclda.sklearn module from the command line, without making any changes to your own code:

python -m aoclda.sklearn your_python_script.py
python -m aoclda.sklearn -m your_python_module

Python APIs

In addition to the scikit-learn patch, AOCL Data Analytics contains its own set of Python APIs providing additional functionality. The package comes with numerous example scripts. To locate these examples, the following commands can be used in your Python interpreter:

>>> from aoclda.examples import info
>>> info.examples_path()
>>> info.examples_list()

Alternatively, from your command prompt, you can call aocl.examples.info as a module to obtain the same information:

python -m aoclda.examples.info

The examples can then be run as standard Python scripts from the command prompt. For example:

python path/to/examples/pca_ex.py

You can also inspect and run the examples from a Python interpreter. For example:

>>> from aoclda.examples import pca_ex
>>> import inspect
>>> print(''.join(inspect.getsourcelines(pca_ex)[0]))
>>> pca_ex.pca_example()

License

The EULA.txt and NOTICE.txt file is included in the licenses directory of the Python package installation. Copyrighted code in AOCL Data Analytics is subject to the licenses set forth in the source code file headers of such code.

Further information

Full documentation of the Python APIs can be found in the AMD technical information portal.

Note that Windows packages do not include the LBFGSB linear model solver or the nonlinear least squares solver. To access these, building from source is required. Source code and compilation instructions are available at https://github.com/amd/aocl-data-analytics/.

The AOCL Data Analytics library is part of AMD Zen Software Studio. It is developed and maintained by AMD. For support or queries, you can e-mail us on toolchainsupport@amd.com.

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.

aoclda-5.3.0.1-cp314-cp314-manylinux_2_28_x86_64.whl (29.1 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

aoclda-5.3.0.1-cp313-cp313-manylinux_2_28_x86_64.whl (29.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

aoclda-5.3.0.1-cp312-cp312-manylinux_2_28_x86_64.whl (29.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

aoclda-5.3.0.1-cp311-cp311-manylinux_2_28_x86_64.whl (29.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

aoclda-5.3.0.1-cp310-cp310-manylinux_2_28_x86_64.whl (29.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

File details

Details for the file aoclda-5.3.0.1-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for aoclda-5.3.0.1-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b8978909b7e7bab9d78f9ad58647df221c3f45186ef6028b48780a85eff65974
MD5 f63bfb5e84ec5753fee81b8d8c2129f6
BLAKE2b-256 ec0edb977cd18b97a298c0f1bc68e7045cd257b02a4ef5efda74ddb8b8502fde

See more details on using hashes here.

File details

Details for the file aoclda-5.3.0.1-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for aoclda-5.3.0.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e3e7eb6bdc99a8b09e7b5908b77ea8c101342b1707e94807cef1d3d3d1cdf460
MD5 056e28f3d0ff5f6592417bb36cefaa2c
BLAKE2b-256 dabcea22642c9e4faf249189404dcd8f9c6d56846edb52e63d150fd8eae7aee6

See more details on using hashes here.

File details

Details for the file aoclda-5.3.0.1-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for aoclda-5.3.0.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b89bec845faffa56194c730152d70ef88f9a0ca962150f7f9f7257ef0f182de5
MD5 4496a5e95756d84663a739678d6532f0
BLAKE2b-256 79af9c50dc20e18ca790203b71a6a6b2a18fe20ffc970c0b32def68c6bd92d00

See more details on using hashes here.

File details

Details for the file aoclda-5.3.0.1-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for aoclda-5.3.0.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 44d692c89574470a9eac72caf1f743026238d232560a05fb6a39be65c3303b5a
MD5 6fe149bce9557b6f1d45631110b32dba
BLAKE2b-256 eb9de9d5e268de02052d48cb453484845c4277e498e0ddfa504340e4c53bda3e

See more details on using hashes here.

File details

Details for the file aoclda-5.3.0.1-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for aoclda-5.3.0.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 82f774d6d0a10bc3c0a426731d8b6762af820c345432a3906a8ace006fd68423
MD5 57cd9bd373b7e9f60ee25a32634900f0
BLAKE2b-256 5668439c146a7fb7477b0d5c456dfa1fe3c17ea8d3383b9bbe17c1703644a8dd

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