Skip to content

Commit 7b09147

Browse files
committed
Squashed commit of the following:
commit dbdb2761db1b3ab0dd2d57d12a408038608e3ef9 Author: Ian Faust <icfaust@gmail.com> Date: Wed Jul 16 07:12:33 2025 +0200 [enhancement] simplify array_api enabling tags via wrapper (#2566) * Update base.py * Update base.py * Update _array_api.py * Update basic_statistics.py * Update base.py * Update _array_api.py * Update _array_api.py * Update _array_api.py * Update dbscan.py * Update basic_statistics.py * Update dbscan.py * Update _array_api.py * Update _array_api.py commit 07003acc3d964d047f8a94f07fc684fa37fd95c8 Author: Ian Faust <icfaust@gmail.com> Date: Wed Jul 16 00:34:39 2025 +0200 [CI] force use of conda-forge as the conda default channel (#2613) * Update build-and-test-lnx.yml * Update build-and-test-lnx.yml * Update conda-recipe-lnx.yml * Update build-and-test-lnx.yml * Update conda-recipe-win.yml * Update build-and-test-win.yml * use native conda calls instead * Revert "use native conda calls instead" This reverts commit 1b96d9834e23d7ea845dfc7ac9df09fcfa4aa091. * try to echo conda-forge instead of blank commit 8274c46a84782a9502322a5d00e36f02359e295b Author: david-cortes-intel <david.cortes@intel.com> Date: Tue Jul 15 13:18:57 2025 +0200 TEST: Add option and instructions to generate a JSON report of conformance tests and comparison of reports (#2608) * add option and instructions for json report of conformance tests * add copyright header * add note in docs * add small util to compare reports * add copyright header * add instructions about gpu tests and preview mode * Update scikit-learn-tests.md Co-authored-by: Ian Faust <icfaust@gmail.com> * more detailed type hint * add link to md file with instructions * Update tests/util_compare_json_reports.py Co-authored-by: Ian Faust <icfaust@gmail.com> * put json instructions under its own header * reword preview mode * more type hints * add delimiters for copyright header * fix type hints * add json report option also on 'run_xpu_tests.py' --------- Co-authored-by: Ian Faust <icfaust@gmail.com> commit 22b5fd73e039f6d7545148211ce2abc48e107e8e Author: david-cortes-intel <david.cortes@intel.com> Date: Tue Jul 15 13:18:36 2025 +0200 FIX: Fix double division of logistic model regularization by sum of weights (#2610) * fix double division of regularization by nrows * rename sklearn estimator with underscore to avoid test conflicts * add comment about logic in the test * fixes commit d3bd0760b97f6727511c08e0c4125128161d0d67 Author: david-cortes-intel <david.cortes@intel.com> Date: Tue Jul 15 09:04:04 2025 +0200 FIX: Sort indices of sparse matrices (#2604) * sort indices of sparse matrices * fix for older scipy * missing import * fix for older scipy * add back deselected tests * move indices sorting to 'to_table' function commit 9e3e4cd10558b61906a4e8a7f1865b033a7256f3 Author: david-cortes-intel <david.cortes@intel.com> Date: Mon Jul 14 13:02:06 2025 +0200 MAINT: Standardize copyright headers (#2611) * standardize copyright headers * align to 80 columns commit 1470f5a3aa67d96182bfd9d783ba89efc7addc00 Author: david-cortes-intel <david.cortes@intel.com> Date: Mon Jul 14 08:01:28 2025 +0200 FIX: Fix incorrect type castings and mismatched operators (#2585) * avoid incorrect castings and undefined behavior * add comment about move op on pointer * avoid move operator commit 4a6c4ea8b4d219048da96f3063e7871748dd8180 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Thu Jul 10 22:35:25 2025 -0700 chore(deps): update dependency pandas to v2.3.1 (#2597) * chore(deps): update dependency pandas to v2.3.1 * Update requirements-test.txt --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> commit 1933e79f118cca81528f1d0a1e68c64a1851efb4 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Thu Jul 10 22:31:03 2025 -0700 Update dependency pybind11 to v3 (#2605) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit d619da3d64633bf3b61c381b3bb350b965c8d186 Author: Ian Faust <icfaust@gmail.com> Date: Thu Jul 10 10:01:41 2025 +0200 [enhancement] enable array_api return values from ```from_table``` (#2441) * startup * refactor from_table * Update _data_conversion.py * Update _data_conversion.py * Update data_conversion.hpp * Update _data_conversion.py * Update _data_conversion.py * Update dbscan.py * Update dbscan.py * Update _data_conversion.py * Update _data_conversion.py * Update _data_conversion.py * Update base.py * Update covariance.py * Update linear_model.py * Update logistic_regression.py * Update forest.py * Update incremental_linear_model.py * Update incremental_linear_model.py * formatting * Update __init__.py * Update forest.py * Update covariance.py * Update test_data.py * Update data_conversion.cpp * Update _data_conversion.py * Update data_conversion.cpp * Update data_conversion.cpp * Update _data_conversion.py * Update data_conversion.cpp * Update _data_conversion.py * Update test_data.py * Update test_data.py * Update test_data.py * Update test_data.py * formatting * clang-formatting * Update _data_conversion.py * add lazy loading of array_api_compat * add to __init__ * remove import * fix for numpy-docs * fix capitalization * fix sparse support * small docs change * fix output message * Update logistic_regression.py * Update _data_conversion.py * change to clearer internal functions * add copy=False * this was not needed * missing space * remove some sua_iface definitions * updates to spmd failures * fixed bad logic * hopefully addresses some of this shape business * attempts at fixing spmd 2 * fix spmd issues 3 * changes requested * Update _data_conversion.py commit 1c892680ae67732a745a25142c2ccb2d9f46f5b1 Author: david-cortes-intel <david.cortes@intel.com> Date: Wed Jul 9 09:45:03 2025 +0200 MAINT: Use latest version of sklearn when building docs (#2603) * use latest version of sklearn when building docs * remove manual install of sklearn in docs-release CI commit 13370dca990fe4833c78ce1675f7c597c2ae8225 Author: david-cortes-intel <david.cortes@intel.com> Date: Wed Jul 9 08:58:08 2025 +0200 FIX: Specify namespace for std types (#2595) commit fe284c19a1ab4a87d50f1b2f563084985124dc45 Author: david-cortes-intel <david.cortes@intel.com> Date: Wed Jul 9 08:32:08 2025 +0200 install scikit-learn to build docs (#2592) commit 3b934d2500313d31696a8d3f16fe480c7c418237 Author: ethanglaser <42726565+ethanglaser@users.noreply.github.com> Date: Tue Jul 8 12:14:07 2025 -0700 Deselect specific sparse elkan tests (#2580) * Deselect specific sparse elkan tests * Update deselected_tests.yaml * Update deselected_tests.yaml * cover all sparse cases * Update deselected_tests.yaml commit c275f09105fc2d9628aa53bd0cb7c056a6b1072c Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Tue Jul 8 09:57:56 2025 -0700 chore(deps): update dependency pandas to v2.3.0 (#2508) * chore(deps): update dependency pandas to v2.3.0 * Update requirements-test.txt --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> commit 86feb8f2107aa6f5b9228de9cfecd74481644783 Author: david-cortes-intel <david.cortes@intel.com> Date: Tue Jul 8 17:35:02 2025 +0200 Fix: Find libs in $DALROOT with conda-style paths (#2594) * check for conda-style paths * fix return conditions * Update scripts/version.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> commit 328471ec29d7cafff08a41773c6f64b768a955d1 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Mon Jul 7 17:50:50 2025 -0700 chore(deps): update dependency pytest to v8.4.1 (#2504) * chore(deps): update dependency pytest to v8.4.1 * Update requirements-test.txt --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> commit 74213cb04ad84d53c938f41153282bbdbc52967f Author: Ian Faust <icfaust@gmail.com> Date: Mon Jul 7 23:58:50 2025 +0200 [enhancement] add dlpack queue extraction and data conversions (#2569) * starting point * Update _sycl_queue_manager.py * Update _sycl_queue_manager.py * Update _third_party.py * Update _sycl_queue_manager.py * Create _dlpack.py * Update __init__.py * Update _sycl_queue_manager.py * Update sycl.cpp * Update _sycl_queue_manager.py * Update _sycl_queue_manager.py * Update _dlpack.py * Update __init__.py * Update _device_offload.py * Update _dlpack.py * Update sycl.cpp * Update _device_offload.py * Update _sycl_queue_manager.py * clean up * Update _sycl_queue_manager.py * Update _device_offload.py * Update _sycl_queue_manager.py * Update _sycl_queue_manager.py * Update _sycl_queue_manager.py * Update _sycl_queue_manager.py * Update _sycl_queue_manager.py * fix import around onedal._default_backend * fix more bugs * Update _sycl_queue_manager.py * Update _dlpack.py * Update _third_party.py * Update _dlpack.py * Update _third_party.py * Update _third_party.py * Update _third_party.py * fixes * add some testing * Update test_sycl.py * Update _device_offload.py * Update _device_offload.py * Update test_sycl.py * Update test_sycl.py * Update test_sycl.py * Update test_config.py * Update test_config.py * Update test_config.py * Update _dlpack.py * Update _device_offload.py * Update test_config.py * Update test_config.py * fixes * fix bug * Update test_config.py * Update test_config.py * Update test_config.py * Update test_config.py * Update _device_offload.py * Update _device_offload.py * Apply suggestions from code review Co-authored-by: Victoriya Fedotova <viktoria.nn@gmail.com> * Update sklearnex/tests/test_config.py * Update test_config.py * Update test_config.py * Update _dlpack.py * Update test_config.py * Update test_config.py --------- Co-authored-by: Victoriya Fedotova <viktoria.nn@gmail.com> commit 0165228cd6423b3546a4d4e6c76ea9d8f21f247e Author: Ian Faust <icfaust@gmail.com> Date: Mon Jul 7 16:14:36 2025 +0200 [CI] update non-GPU GitHub actions runner sklearn versions (#2582) * Update ci.yml * Update ci.yml * Update deselected_tests.yaml * Update deselected_tests.yaml commit cfe5cfd4af4be315fa3d61408ec95578ca5d646f Author: Ian Faust <icfaust@gmail.com> Date: Fri Jul 4 22:15:35 2025 +0200 [CI] swap uxl self-hosted runners to github hosted (#2586) commit edf34cf0b22cc7384ada372eb84d9b51e98fc309 Author: david-cortes-intel <david.cortes@intel.com> Date: Fri Jul 4 15:11:23 2025 +0200 ENH: Allow compiling with LLD as linker (#2583) * add option for lld and instructions * typo * missing comma commit e932321845aa6ae517aff437c1d5f999cf336f8a Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Thu Jul 3 13:22:26 2025 -0700 chore(deps): update dependency scikit-learn to v1.7.0 (#2512) * chore(deps): update dependency scikit-learn to v1.7.0 * Update requirements-test.txt --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> commit 490211dc8038734a22f00abfb26f71f1d3442007 Author: Alexander Andreev <alexander.andreev@intel.com> Date: Thu Jul 3 10:04:49 2025 +0100 CI matrix update and Array API fixes required to pass it (#2567) * Add sklearn 1.7 to CI matrix * Fix for _FuncWrapper * Add new Array API test deselections * Linting * Shift CI matrix * Add deselection aliases * Upgrade array-api-strict version * Add comment for _FuncWrapper commit a5b4e69d55487ceb799b39abc54cd679fc0ecbdb Author: ethanglaser <42726565+ethanglaser@users.noreply.github.com> Date: Tue Jul 1 13:36:28 2025 -0700 Support for sklearn 1.6 conformance testing (#2465) * tweaks to logistic_path to match sklearn * follow ups * sklearn 1.4 gpu conformance fix attempt * restore svm changes and move ridge checks to sklearnex * update deselected tests file * add 4 more deselections * apply black formatting * xpass/xfail deselections...I give up * one more xfail --------- Co-authored-by: Alexander Andreev <alexander.andreev@intel.com> commit 63cfefefbb082074f7ea152ad8b267f644e8db5b Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Tue Jul 1 15:35:31 2025 +0100 chore(deps): update dependency numpy to v2.3.1 (#2574) * chore(deps): update dependency numpy to v2.3.1 * Update dependencies-dev --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> commit a271eada205b70fc9e4893fff1d254fb0bf7f7d4 Author: david-cortes-intel <david.cortes@intel.com> Date: Tue Jul 1 08:40:28 2025 +0200 FIX: Fix logic to check for existence of different oneDAL libraries (#2577) * fix logic to detect present onedal libs * missing import * check that path exists * pass variable instead of redefining * missing arg * remove unused import commit 5c99508f3ef4922c507ffc1af62068650dce4ee3 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Fri Jun 27 09:43:54 2025 +0100 chore(deps): update pre-commit hook numpy/numpydoc to v1.9.0 (#2575) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 2fdba34c4dc3c7ec5a2a8ed74a88893f19aba4ab Author: david-cortes-intel <david.cortes@intel.com> Date: Fri Jun 27 08:47:18 2025 +0200 DOC: Better explanations about GPGPU driver installations (#2464) * more details about GPGPU drivers * advertise iGPU compat more visibly * Update doc/sources/oneapi-gpu.rst Co-authored-by: Ian Faust <icfaust@gmail.com> * Update doc/sources/oneapi-gpu.rst Co-authored-by: Ian Faust <icfaust@gmail.com> * add link to arch wiki and more details * reword compute-follows-data idea * reword 'gpgpu drivers' -> 'compute runtime' * Update doc/sources/oneapi-gpu.rst Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> --------- Co-authored-by: Ian Faust <icfaust@gmail.com> Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> commit 1f157452129517a0eb7c55a264e93ede4e3f6c4f Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Thu Jun 26 13:08:14 2025 -0700 chore(deps): update pre-commit hook psf/black to v25 (#2564) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 7585bf84d9acaef054fa1d386b353ddd21a476e3 Author: Alexander Andreev <alexander.andreev@intel.com> Date: Thu Jun 26 13:30:15 2025 +0100 Update ubuntu CI image to 24.04 (#2571) * Update ubuntu CI image to 24.04 * Unpin python version in pre-commit config to use default available in system commit 022768d23e70010e004eddaf25a5ebd7684a0113 Author: david-cortes-intel <david.cortes@intel.com> Date: Thu Jun 26 14:23:29 2025 +0200 ENH: Add command line option for debug builds (#2572) * add argument for debug builds * clarify about behavior on windows commit d56958e5553fcb80dbbe233edb89d158d815aee1 Author: ethanglaser <42726565+ethanglaser@users.noreply.github.com> Date: Thu Jun 26 00:13:42 2025 -0700 fix: forest dpctl predict queue misalignment (#2507) * fix: forest dpctl predict queue misalignment * black formatting * sycl_queue -> device commit 66325239f7ff5a6e983c6a46e5256f491a6e6641 Author: Ian Faust <icfaust@gmail.com> Date: Wed Jun 25 14:14:50 2025 +0200 [maintenance] lazy load dpnp.tensor/dpnp and prepare for array_api lazy importing (#2509) * starting point * first cut * rename * fix various testing imports * don't get ahead of my skis * attempt to further move things apart * remove get_unique_values_with_dpep * remove actually * Update _array_api.py * try to fix * Update _device_offload.py * Update _device_offload.py * Update _device_offload.py * Update _device_offload.py * Update _sycl_usm.py * Update _third_party.py * Update _device_offload.py * Update _device_offload.py * Update _device_offload.py * Update _device_offload.py * Update _sycl_usm.py * Update _sycl_usm.py * Update _third_party.py * Update _third_party.py * Update _sycl_usm.py * Update _third_party.py * Update _third_party.py * Update _array_api.py * Update _array_api.py * formatting * Update setup.py * Update _third_party.py * Update _third_party.py * Update _third_party.py * Update _data_conversion.py * Update __init__.py * Update __init__.py * Update _data_conversion.py * Update _device_offload.py * Update _third_party.py * add requested comments to code * add requested comments to code * fix codespell hits * Update test_common.py * Update test_common.py * Update test_common.py * Update test_common.py * Update test_common.py * Update test_common.py * Update test_common.py * Update test_common.py * Update test_common.py * Update test_common.py * Update test_common.py * Update test_common.py * Update test_common.py * Update test_common.py * Update test_common.py * Update test_common.py * Update test_common.py * Update test_common.py * Update test_common.py * Update test_common.py * Update test_common.py * Update test_common.py * Update test_common.py * Update test_common.py * Update test_common.py * Update test_common.py * Update _data_conversion.py * Update _data_conversion.py * Update test_common.py * Update _data_conversion.py * Update _data_conversion.py commit c8fb137b678d972bfad6611dfbc9dc5b0b04e00f Author: david-cortes-intel <david.cortes@intel.com> Date: Mon Jun 23 15:25:08 2025 +0200 DOC: Reword description about patching in preview mode (#2491) * reword description about patching in preview * corrections about patching non-sklearn classes * include necessary file commit 46e8ca34a443ae5aaff596966542143309cf351c Author: david-cortes-intel <david.cortes@intel.com> Date: Mon Jun 23 14:28:50 2025 +0200 MAINT: Don't make inapplicable conditions block oneDAL usage in LogisticRegression (#2513) * remove unnecessary conditions * update support table * Update sklearnex/linear_model/logistic_regression.py Co-authored-by: Ian Faust <icfaust@gmail.com> --------- Co-authored-by: Ian Faust <icfaust@gmail.com> commit 96bc915ece645a496712fc6f2a6640171b5edb47 Author: david-cortes-intel <david.cortes@intel.com> Date: Mon Jun 23 08:39:12 2025 +0200 FIX: Fix table destructor not being called (#2540) * fix uncalled destructor * Update onedal/datatypes/table.cpp Co-authored-by: Ian Faust <icfaust@gmail.com> --------- Co-authored-by: Ian Faust <icfaust@gmail.com> commit 28540d0c597edc19b6e36a7aa228a0a3792174a5 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Fri Jun 20 09:54:35 2025 +0100 chore(deps): update dependency cython to v3.1.2 (#2518) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 04fb452c5b689a220f1cadb5f8dc00a066327c80 Author: Ian Faust <icfaust@gmail.com> Date: Fri Jun 20 09:19:38 2025 +0200 [CI] Centralize clang-format install to dependencies-dev (#2543) * Update dependencies-dev * Update build-and-test-lnx.yml * Update build-and-test-win.yml * Update ci.yml * Update dependencies-dev commit 2159f3e1ca8cdca15eefbef7dfa32bec45c06af2 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Thu Jun 19 19:09:23 2025 +0100 chore(deps): update dependency urllib3 to v2.5.0 [security] (#2563) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit b7e84b250aa50d0966f34e3c07d284cba1e871a4 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Thu Jun 19 16:26:59 2025 +0200 chore(deps): update pre-commit hook psf/black to v24.10.0 (#2559) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit ed954c1fb8dfffc4bb3cb9a7873a4bbf916c6d4e Author: Ian Faust <icfaust@gmail.com> Date: Wed Jun 18 22:53:13 2025 +0200 [CI] fix spelling mistakes in the codebase by adding codespell (#2550) * Update .pre-commit-config.yaml * Create .codespellrc * Update .codespellrc * Update daal4py_data_science.ipynb * Update .codespellrc * Update format.py * Update dist_kmeans.h * Update map_reduce_tree.h * Update transceiver.h * Update base.py * Update test_n_jobs_support.py * Update base.py * Update _device_offload.py * Update forest.py * Update data_conversion.cpp * Update _data_conversion.py * Update dtype_conversion.cpp * Update sycl_usm_utils.cpp * Update common.py * Update test_common.py * Update _device_offload.py * Update dbscan.cpp * Update gen_daal4py.py * address spelling issues * last changes * Update dbscan.py * Update dbscan.py * Update decision_forest_classification_default_dense.py * Update decision_forest_classification_hist.py * Update decision_forest_regression_default_dense.py * Update decision_forest_regression_hist.py commit b203abdfc892afb6adeca66f13700d238d99caec Author: Victoriya Fedotova <victoriya.s.fedotova@intel.com> Date: Wed Jun 18 20:27:44 2025 +0200 Add grain_size hyperparameter into EmpiricalCovariance and PCA algorithms (#2492) * cpu_grain_size hyperparameter was added to EmpiricalCovariance estimator. * cpu_grain_size and cpu_macro_block hyperparameters were added to PCA estimator. * gen_daal4py.py was modified to report the problem with clang-format installation on the setup stage. commit 1d3358353904741e238040a800749ea5cf99cbf4 Author: Ian Faust <icfaust@gmail.com> Date: Wed Jun 18 19:29:52 2025 +0200 Update renovate.json to check pre-commit versions (#2558) commit 95ec3eaa41406509d410382920fdac3ec950e91f Author: Ian Faust <icfaust@gmail.com> Date: Wed Jun 18 12:20:57 2025 +0200 [CI, enhancement] add pytorch+gpu testing ci (#2494) * Update _dataframes_support.py * Update conftest.py * Update conftest.py * Update _dataframes_support.py * Update _dataframes_support.py * Update _dataframes_support.py * Update _dataframes_support.py * Update _dataframes_support.py * Update _dataframes_support.py * Update _dataframes_support.py * Update conftest.py * Update conftest.py * Update conftest.py * Update _dataframes_support.py * Update run_test.sh * Update conftest.py * Update run_test.sh * Update run_test.sh * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update run_sklearn_tests.sh * Update ci.yml * Update ci.yml * Update validation.py * Update validation.py * Update validation.py * Update validation.py * Update _device_offload.py * Update _data_conversion.py * Update __init__.py * Update run_sklearn_tests.sh * Update _device_offload.py * Update _data_conversion.py * Update validation.py * Update table.cpp * Update _device_offload.py * Update _device_offload.py * Update deselected_tests.yaml * Update deselected_tests.yaml * Update _device_offload.py * Update deselected_tests.yaml * Update ci.yml * Update ci.yml * Update deselected_tests.yaml * Update ci.yml * Update deselected_tests.yaml * Update validation.py * Update ci.yml * Update __init__.py * Update _data_conversion.py * Update _device_offload.py * Update ci.yml * Update _device_offload.py * Update validation.py commit e074be576a8d7b7c19f7e78d8d539b541b4a04a1 Author: Ian Faust <icfaust@gmail.com> Date: Wed Jun 18 08:01:01 2025 +0200 [enhancement] set specific failure for host builds with "target_offload" (#2388) * Update sycl.cpp * Update _sycl_queue_manager.py * Update test_config.py * Update sycl.cpp * Update sycl.cpp * Update sycl.cpp * Update sycl.cpp * Update dal.cpp * Update dal.cpp * fix logic * formatting * convert into an object * Update test_config.py * Update test_config.py * Update test_config.py * Update test_config.py * Update test_config.py * Update sycl.cpp * Update test_config.py * Update _device_offload.py * Update _sycl_queue_manager.py * Update test_config.py * Update ci.yml * Update ci.yml * Update sycl.cpp * Update sycl.cpp * Update test_config.py * Update sycl.cpp * Update _sycl_queue_manager.py * Update build-and-test-lnx.yml * Update build-and-test-lnx.yml * Update build-and-test-lnx.yml * Update build-and-test-lnx.yml * Update build-and-test-lnx.yml * Update build-and-test-lnx.yml * Update build-and-test-lnx.yml * Update build-and-test-lnx.yml * Update build-and-test-lnx.yml * Update build-and-test-lnx.yml * Update build-and-test-lnx.yml * Update sycl.cpp * Update test_config.py * Update test_config.py * Update test_config.py * Update sycl.cpp * Update _config.py commit afd9399fea42ee47b180e6125b60c2f0408168d9 Author: Ian Faust <icfaust@gmail.com> Date: Tue Jun 17 22:12:11 2025 +0200 [CI, Enhancement] add external pytest frameworks control (#2489) * Update _dataframes_support.py * Update conftest.py * Update conftest.py * Update _dataframes_support.py * Update _dataframes_support.py * Update _dataframes_support.py * Update _dataframes_support.py * Update _dataframes_support.py * Update _dataframes_support.py * Update _dataframes_support.py * Update conftest.py * Update conftest.py * Update conftest.py * Update _dataframes_support.py * Update run_test.sh * Update conftest.py * Update run_test.sh * Update run_test.sh commit c2b855920499a8a1f3a22f960aa79a4898fac6ef Author: Ian Faust <icfaust@gmail.com> Date: Tue Jun 17 19:36:35 2025 +0200 [bugfix] fix array type issues in ```pca.inverse_transform``` without ```array_api_dispatch``` enabled (#2555) * Update pca.py * Update pca.py * Update pca.py commit d7536f3416a9fd2e186847c3b66add63f3a19b67 Author: Ian Faust <icfaust@gmail.com> Date: Tue Jun 17 15:05:09 2025 +0200 [bug] fix policy changes for spmd (#2554) * Update dal.cpp * Update policy.cpp commit b742d86a7b8d6fcf1ab14880469e4fc68c07d70b Author: ethanglaser <42726565+ethanglaser@users.noreply.github.com> Date: Mon Jun 16 02:58:59 2025 -0700 fix: minor basic stats quality fixes (#2521) * fix: minor basic stats quality fixes * blacked * vary seed by rank instead of size commit c15f0119899d68cce7c847c805a7f6ba60df3d82 Author: ethanglaser <42726565+ethanglaser@users.noreply.github.com> Date: Mon Jun 16 02:22:21 2025 -0700 fix: jupyter nightly (#2530) * fix: jupyter nightly * minor * add logging * increase timeout * remove ridge higgs * restore temporary things * adding comment * drop yolanda as well commit 08e9881f990f402f6d278e105d1796b9e28fe83e Author: Ian Faust <icfaust@gmail.com> Date: Mon Jun 16 11:21:46 2025 +0200 [CI] upgrade dpcpp for CondaEnv to 2025.1 (#2514) commit 2d6fdc2fb97b178806cda969e5e20d16bccd1d8a Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Mon Jun 16 10:17:09 2025 +0100 chore(deps): update dependency cmake to v4.0.3 (#2547) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 9d82eb9fee0b091c5409a7e540ae3f3d5db67b20 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Fri Jun 13 17:23:54 2025 +0100 chore(deps): update dependency pyzmq to v27 (#2546) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit bf674b43fd6f57aad8a101eb4975134059b41b96 Author: david-cortes-intel <david.cortes@intel.com> Date: Fri Jun 13 12:47:54 2025 +0200 update tags and docs for skl1.7 (#2544) commit bfbb2384a6ed9925f78b6edb40333bb6b064e5c2 Author: david-cortes-intel <david.cortes@intel.com> Date: Fri Jun 13 11:30:14 2025 +0200 DOC: More hints for building with ASAN (#2542) * more hints for asan * Update INSTALL.md Co-authored-by: Ian Faust <icfaust@gmail.com> --------- Co-authored-by: Ian Faust <icfaust@gmail.com> commit 2325b08fa790dcfab76e2760ccddd86d972ebd05 Author: david-cortes-intel <david.cortes@intel.com> Date: Fri Jun 13 10:56:45 2025 +0200 remove dead code (#2539) commit 86188a0037d16d93657203c87f73031208af687d Author: david-cortes-intel <david.cortes@intel.com> Date: Fri Jun 13 09:56:51 2025 +0200 FIX: Don't forcibly add `-s` to debug builds (#2537) * don't add 's' when adding 'g' or non-release builds * merge into next condition commit e0e1816e5f23ba2c9b67f32c785444fbbd31f3bb Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Fri Jun 13 07:55:50 2025 +0200 chore(deps): update doc packages (#2503) * chore(deps): update doc packages * fix doc req updates * oops --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: eglaser <ethan.glaser@intel.com> commit e969395f62a253402b0ee64cf39296fc3d2b6ad5 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Thu Jun 12 14:30:35 2025 -0700 chore(deps): update dependency shap to v0.48.0 (#2541) * chore(deps): update dependency shap to v0.48.0 * remove python version requirement --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> commit 0560581347d85e3f6a3bf7570dc18fe92e3c7bf0 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Thu Jun 12 11:55:31 2025 -0700 chore(deps): update dependency pytest-cov to v6.2.1 (#2538) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 37380836c72243e979b6ef3315e4d539d2f48ef7 Author: david-cortes-intel <david.cortes@intel.com> Date: Thu Jun 12 08:56:10 2025 +0200 link to docs of classes/functions in support table (#2535) commit f2052fde88f5354d2732432248a90800304bca0d Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Thu Jun 12 08:22:07 2025 +0200 chore(deps): update dependency pytest-cov to v6.2.0 (#2536) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 65b956ff5f574a83a8197db3ff7304b03c2e4b4e Author: Nikolay Petrov <nikolay.a.petrov@intel.com> Date: Wed Jun 11 10:34:58 2025 -0700 Codeowners update (#2519) * Update CODEOWNERS with additional tree owners * Update CODEOWNERS commit 7062a1e351beff5635eb18fd8b31dae139c47fd2 Author: yuejiaointel <108152493+yuejiaointel@users.noreply.github.com> Date: Wed Jun 11 10:06:51 2025 -0700 update: update algorithm.rst based on current implementation (#2354) * update: update aldorithm and preview * fix: remove incremental algos and added extra trees and tsne n_compoents description * fix: fix basic stats * fix: fix basic stats * fix: went through all algos * fix: address comments * fix move incremental imiltaiton under notes * fix: add notes in other incremental algos * fix: sklearn < 1.5 * fix: removed versions * Update doc/sources/algorithms.rst Co-authored-by: david-cortes-intel <david.cortes@intel.com> * fix: various chagnes based on comments * fix: add verbose note * Update doc/sources/algorithms.rst Co-authored-by: david-cortes-intel <david.cortes@intel.com> * fix: verbose html * fix: verbose note * fix: address comments * fix: increoemtn notes * fix: verbose * fix: LogisticRegression * fix: doc ci * fix: fix basic stats format * fix: fix basic stats * fix: fix basic stats * fix: format * fix: fix indent * fix: format * fix: address comments * fix: fix logistic regression cpu * fix: fix logistic regression cpu * fix: fix spmd logistic regression --------- Co-authored-by: david-cortes-intel <david.cortes@intel.com> commit c549b8673d86c47e6782a7cd533c286f57db0d7c Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Tue Jun 10 11:32:27 2025 -0700 chore(deps): update dependency requests to v2.32.4 [security] (#2525) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit e8111d2c8dd94e8741a62f1647c08e34effe7e6f Author: Nikolay Petrov <nikolay.a.petrov@intel.com> Date: Tue Jun 10 08:14:50 2025 -0700 DOC: fix broken support link (#2520) commit bc0f3ff33c697f8c89970e38adaaa69e9f0eb0d3 Author: Ian Faust <icfaust@gmail.com> Date: Tue Jun 10 13:01:41 2025 +0200 Update pca.py (#2506) commit 925f65fd7fb361fdefbbe9016e1779e8b5a4905b Author: Ian Faust <icfaust@gmail.com> Date: Tue Jun 10 12:44:09 2025 +0200 [CI, enhancement] enable external oneDAL builds in build-and-test-win.yml Azure Pipelines (#2482) * Update bld.bat * Update build-and-test-win.yml * Update build-and-test-win.yml * Update build-and-test-win.yml * Update build-and-test-win.yml * Update conda-recipe-win.yml * Update build-and-test-win.yml * Update build-and-test-win.yml * Update conda-recipe-win.yml * Update build-and-test-win.yml * Update build-and-test-lnx.yml * Update build-and-test-win.yml commit 488ba2d964c5e21f37c36ce6b6c64e387faac92e Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Mon Jun 9 22:47:10 2025 +0100 chore(deps): update dependency numpy to v2.3.0 (#2517) commit 95c73bda48a59c8a2e4cafc12861aa2b0965c5f1 Author: Alexander Andreev <alexander.andreev@intel.com> Date: Mon Jun 9 16:42:24 2025 +0100 Fixes for sklearn 1.7 pre-release support (#2451) * Fixes for sklearn 1.7 pre-release support * Fix ensemble probabilities interval * Change scaling method to `clip` --------- Co-authored-by: icfaust <icfaust@gmail.com> commit ce81dc548af664372c2c4ef1e5dc1ee9529e4eb3 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Mon Jun 9 11:24:51 2025 +0100 chore(deps): update ossf/scorecard-action action to v2.4.2 (#2502) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit edbbad8200eb0554a128130a7146734717a6d82b Author: yuejiaointel <108152493+yuejiaointel@users.noreply.github.com> Date: Thu Jun 5 22:55:26 2025 -0700 Add check warning to build-doc.sh (#2511) * fix: add flags and test * fix: works commit 11e3dd20bb4b47ecdbd0af212c17864899b242c7 Author: david-cortes-intel <david.cortes@intel.com> Date: Fri Jun 6 07:50:39 2025 +0200 fix italics formatting (#2510) commit be4777e84cd9f488ac7d86436580728bdac4a035 Author: david-cortes-intel <david.cortes@intel.com> Date: Thu Jun 5 10:34:28 2025 +0200 DOC: Add instructions for building with ASAN (#2473) * add instructions for building with ASAN * remove unneeded variable * Update INSTALL.md Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> * ENH: Enable model conversion from TreeLite (#2452) * add conversion from treelite * add dependency also for conda * [enhancement, CI] add numpydoc validation to pre-commit (#2455) * Update .pre-commit-config.yaml * Update .pre-commit-config.yaml * Update pyproject.toml * Update pyproject.toml * Update pyproject.toml * Update .pre-commit-config.yaml * Update .pre-commit-config.yaml * Update pyproject.toml * Update pyproject.toml * Update dispatcher.py * Update dispatcher.py * Update .pre-commit-config.yaml * Update pyproject.toml * Update pyproject.toml * Update incremental_basic_statistics.py * Update incremental_linear.py * Update incremental_linear.py * Update incremental_linear.py * Update _device_offload.py * Update incremental_basic_statistics.py * Update incremental_basic_statistics.py * Update basic_statistics.py * Update incremental_pca.py * Update incremental_linear_model.py * Update incremental_covariance.py * Update incremental_ridge.py * Update incremental_linear.py * Update incremental_ridge.py * make fixes * Update _config.py * Update _config.py * Update _config.py * Update _backend.py * Update _dpep_helpers.py * Update _dpep_helpers.py * Update kernel_functions.py * Update kernel_functions.py * Update kernel_functions.py * Update kernel_functions.py * Update kernel_functions.py * Update kernel_functions.py * Update svm.py * Update _data_conversion.py * Update _data_conversion.py * Update _data_conversion.py * Update __init__.py * Update __init__.py * Update __init__.py * Update _device_offload.py * Update _device_offload.py * Update covariance.py * Update incremental_covariance.py * Update incremental_covariance.py * Update incremental_linear_model.py * Update incremental_linear_model.py * Update incremental_linear_model.py * Update linear_model.py * Update linear_model.py * Update linear_model.py * Update linear_model.py * Update incremental_basic_statistics.py * Update kmeans.py * Update pca.py * Update basic_statistics.py * Update basic_statistics.py * Update basic_statistics.py * Update basic_statistics.py * Update incremental_pca.py * Update basic_statistics.py * Update incremental_pca.py * Update logistic_regression.py * Update incremental_pca.py * Update _config.py * Update _config.py * Update _device_offload.py * Update _device_offload.py * Update _device_offload.py * Update _device_offload.py * Update validation.py * Update _sycl_queue_manager.py * Update _sycl_queue_manager.py * Update _sycl_queue_manager.py * Update _sycl_queue_manager.py * Update _backend.py * Update _utils.py * Update _utils.py * Update _utils.py * Update _utils.py * Update _utils.py * Apply suggestions from code review Co-authored-by: david-cortes-intel <david.cortes@intel.com> * Update _utils.py * Update _device_offload.py * Apply suggestions from code review Co-authored-by: david-cortes-intel <david.cortes@intel.com> --------- Co-authored-by: david-cortes-intel <david.cortes@intel.com> * [enhancement] add ```__dlpack__``` and ```__dlpack_device__``` attributes to python oneDAL table class (#2430) * initial save * save point * interim stop * check: * fix most problems * save point * formatting * clang-formatting and save point * add testing * address coverage for dlpack::free_capsule * formatting * add gc and static_cast * remove comment * add suggestion * chore(deps): update dependency xgboost to v3.0.1 (#2474) * chore(deps): update dependency xgboost to v3.0.1 * Update requirements-test.txt --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> * chore(deps): update dependency cython to v3.1.0 (#2470) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency cmake to v4.0.2 (#2468) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * DOC: Clarify that SPMD is linux-only (#2476) * clarify that SPMD is not available on windows builds * Update doc/sources/distributed-mode.rst Co-authored-by: yuejiaointel <108152493+yuejiaointel@users.noreply.github.com> --------- Co-authored-by: yuejiaointel <108152493+yuejiaointel@users.noreply.github.com> * DOC: More details for conda installs (#2475) * add conda-forge channel for dependencies, mention incompatibilities with anaconda * update commands also in .md file * suggest impi install from conda-forge * remove warning about conda-forge incompatibilities * Update INSTALL.md Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> * Update doc/sources/distributed-mode.rst Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> * Update doc/sources/distributed-mode.rst Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> --------- Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> * chore(deps): update dependency tornado to v6.5 [security] (#2478) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Migrate to modern NumPy interface (#2479) * Migrate to modern NumPy interface Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com> * Update onedal/utils/validation.py Co-authored-by: david-cortes-intel <david.cortes@intel.com> * Update sklearnex/svm/_common.py Co-authored-by: david-cortes-intel <david.cortes@intel.com> --------- Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com> Co-authored-by: david-cortes-intel <david.cortes@intel.com> * fix: add cstdint include to transceiver for public CI (#2484) * chore(deps): update dependency cython to v3.1.1 (#2483) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency numpy to v2.2.6 (#2481) * chore(deps): update dependency numpy to v2.2.6 * Update dependencies-dev * Update dependencies-dev --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> * chore(deps): update dependency array-api-compat to v1.12.0 (#2477) * chore(deps): update dependency array-api-compat to v1.12.0 * Update requirements-test.txt --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> * downgrade setuptools to v79 for develop mode setup (#2480) * chore(deps): update dependency xgboost to v3.0.2 (#2490) * chore(deps): update dependency xgboost to v3.0.2 * Update requirements-test.txt --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> * fix: use upload github action to public site (#2459) * fix: use upload github action to public site * fix: allow tag trigger with also year.month * test: test tag trigger * test: test tag trigger * .github/workflows/docs-release.yml * fix: don't copy gh-pages everytime, only copy parts don't exist * fix:move prepare script to doc_release.sh * fix:test checkout * fix:test upload pages artifact only has v3 * fix: fetch gh-apges if we have one * fix: use eaceiris/actions-gh-pages@v3 to keep old files when upload new ones * fix: use a intermediate unprotected branch for all doc archives * fix: fix archive * fix: fix archive * fix: remove doc from switcher url in conf and archive enture folder * fix: remove +x changes in doc relase before archive step * fix: move permission and use exact commit id for github actions * fix: use env var for _site folder and use doc folders for archive branch * fix: delete everything for new doc arvhice branch * fix: remove untracked files * fix: only add verison folders to git first time doc archive * fix: move TEMP_DOC_FOLDER to yml and make sure it is im tmp * fix: move env to jobs * fix: still need git rm for firs ttime doc archive creation * fix: remove doc * fix: allow manual trigger * fix: workflow dispatch add input requriement * fix: don't force input on workflow dispatch * test: test older python version doc build warning * fix: force doc version input * fix: remove unused dependency --------- Co-authored-by: yuejiaointel <41898282+github-actions[bot]@users.noreply.github.com> * ci(workflows): add `OpenSSF Scorecard` GitHub Action (#2499) * [CI, bugfix] correct stability issues in CondaRecipes (#2493) * Update conda-recipe-lnx.yml * Update conda-recipe-win.yml * Update conda-recipe-lnx.yml * Update conda-recipe-win.yml * Update test_model_builders.py * Update test_model_builders.py * Delete tests/test_model_builders.py * Revert "Delete tests/test_model_builders.py" This reverts commit 453dd88eb186cb18914c0cc1f36e1e0e10355e41. * disable catboost and check * Update test_model_builders.py * Update test_model_builders.py * Update test_model_builders.py * Update test_model_builders.py * Update test_model_builders.py * Update test_model_builders.py * Update test_model_builders.py * Update test_model_builders.py * Update test_model_builders.py * [CI] temporarily deselect ```test_dbscan_params_validation``` for green CI (#2500) * Update deselected_tests.yaml * Update deselected_tests.yaml Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> --------- Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> * [enhancement] unify policy creation in pybind11 (#2390) * create get_policy * formatting * Update policy.cpp * Update INSTALL.md Co-authored-by: Ian Faust <icfaust@gmail.com> * Update INSTALL.md Co-authored-by: Ian Faust <icfaust@gmail.com> * Update INSTALL.md Co-authored-by: Ian Faust <icfaust@gmail.com> * Update INSTALL.md Co-authored-by: Ian Faust <icfaust@gmail.com> * Update INSTALL.md Co-authored-by: Ian Faust <icfaust@gmail.com> * Update INSTALL.md Co-authored-by: Ian Faust <icfaust@gmail.com> --------- Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com> Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> Co-authored-by: Ian Faust <icfaust@gmail.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: yuejiaointel <108152493+yuejiaointel@users.noreply.github.com> Co-authored-by: Emmanuel Ferdman <emmanuelferdman@gmail.com> Co-authored-by: yuejiaointel <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Aleksei Khomenko <aleksei.khomenko@intel.com> commit ac78a40e5379dbb62c40a503afd75707ed885ecd Author: Ian Faust <icfaust@gmail.com> Date: Thu Jun 5 10:27:04 2025 +0200 reword comment about dlpack support (#2505) commit cf2dbcbd8ed10bbbcd6b13116327b43d99c43fad Author: Ian Faust <icfaust@gmail.com> Date: Sat May 31 19:02:56 2025 +0200 [enhancement] unify policy creation in pybind11 (#2390) * create get_policy * formatting * Update policy.cpp commit 79af322e314057330b0671e50bcbcee7bc74ea30 Author: Ian Faust <icfaust@gmail.com> Date: Sat May 31 15:39:09 2025 +0200 [CI] temporarily deselect ```test_dbscan_params_validation``` for green CI (#2500) * Update deselected_tests.yaml * Update deselected_tests.yaml Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> --------- Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> commit 249417220c024232eac5644ee41e61277e3c681f Author: Ian Faust <icfaust@gmail.com> Date: Sat May 31 12:09:16 2025 +0200 [CI, bugfix] correct stability issues in CondaRecipes (#2493) * Update conda-recipe-lnx.yml * Update conda-recipe-win.yml * Update conda-recipe-lnx.yml * Update conda-recipe-win.yml * Update test_model_builders.py * Update test_model_builders.py * Delete tests/test_model_builders.py * Revert "Delete tests/test_model_builders.py" This reverts commit 453dd88eb186cb18914c0cc1f36e1e0e10355e41. * disable catboost and check * Update test_model_builders.py * Update test_model_builders.py * Update test_model_builders.py * Update test_model_builders.py * Update test_model_builders.py * Update test_model_builders.py * Update test_model_builders.py * Update test_model_builders.py * Update test_model_builders.py commit b1e17957072defc230619416952aed71a3689fb2 Author: Aleksei Khomenko <aleksei.khomenko@intel.com> Date: Fri May 30 16:37:52 2025 +0200 ci(workflows): add `OpenSSF Scorecard` GitHub Action (#2499) commit 068dde500c15a7c91538a489c22fbabd05197ee9 Author: yuejiaointel <108152493+yuejiaointel@users.noreply.github.com> Date: Wed May 28 22:10:35 2025 -0700 fix: use upload github action to public site (#2459) * fix: use upload github action to public site * fix: allow tag trigger with also year.month * test: test tag trigger * test: test tag trigger * .github/workflows/docs-release.yml * fix: don't copy gh-pages everytime, only copy parts don't exist * fix:move prepare script to doc_release.sh * fix:test checkout * fix:test upload pages artifact only has v3 * fix: fetch gh-apges if we have one * fix: use eaceiris/actions-gh-pages@v3 to keep old files when upload new ones * fix: use a intermediate unprotected branch for all doc archives * fix: fix archive * fix: fix archive * fix: remove doc from switcher url in conf and archive enture folder * fix: remove +x changes in doc relase before archive step * fix: move permission and use exact commit id for github actions * fix: use env var for _site folder and use doc folders for archive branch * fix: delete everything for new doc arvhice branch * fix: remove untracked files * fix: only add verison folders to git first time doc archive * fix: move TEMP_DOC_FOLDER to yml and make sure it is im tmp * fix: move env to jobs * fix: still need git rm for firs ttime doc archive creation * fix: remove doc * fix: allow manual trigger * fix: workflow dispatch add input requriement * fix: don't force input on workflow dispatch * test: test older python version doc build warning * fix: force doc version input * fix: remove unused dependency --------- Co-authored-by: yuejiaointel <41898282+github-actions[bot]@users.noreply.github.com> commit 1274fab27f4abaa4adb5ab4f2d6b343fd5c26d18 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Tue May 27 11:46:18 2025 -0700 chore(deps): update dependency xgboost to v3.0.2 (#2490) * chore(deps): update dependency xgboost to v3.0.2 * Update requirements-test.txt --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> commit 61426c8bdafd06b673c1e05b2aa70c965e780176 Author: ethanglaser <42726565+ethanglaser@users.noreply.github.com> Date: Wed May 21 08:50:04 2025 -0700 downgrade setuptools to v79 for develop mode setup (#2480) commit a347fe4cd3fb2e80bb0af771cd1c5b49a50e7563 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Wed May 21 07:11:08 2025 -0700 chore(deps): update dependency array-api-compat to v1.12.0 (#2477) * chore(deps): update dependency array-api-compat to v1.12.0 * Update requirements-test.txt --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> commit f1ffc313bc64fce3f8a1d60574588eb90af73e6c Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Wed May 21 07:10:27 2025 -0700 chore(deps): update dependency numpy to v2.2.6 (#2481) * chore(deps): update dependency numpy to v2.2.6 * Update dependencies-dev * Update dependencies-dev --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> commit 54da574ff3cf4fcbe18618847db79e45a5dadab1 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Wed May 21 07:08:59 2025 -0700 chore(deps): update dependency cython to v3.1.1 (#2483) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 252297e111ff9d531a9230292ed4ea35e7299690 Author: ethanglaser <42726565+ethanglaser@users.noreply.github.com> Date: Wed May 21 07:08:01 2025 -0700 fix: add cstdint include to transceiver for public CI (#2484) commit dcad0da8de00d7714286496f9d17adca204f8c4b Author: Emmanuel Ferdman <emmanuelferdman@gmail.com> Date: Wed May 21 13:55:08 2025 +0300 Migrate to modern NumPy interface (#2479) * Migrate to modern NumPy interface Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com> * Update onedal/utils/validation.py Co-authored-by: david-cortes-intel <david.cortes@intel.com> * Update sklearnex/svm/_common.py Co-authored-by: david-cortes-intel <david.cortes@intel.com> --------- Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com> Co-authored-by: david-cortes-intel <david.cortes@intel.com> commit 8e3c8e7b17f40c0dba696ac36e556fee6abe9480 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Fri May 16 12:38:03 2025 -0700 chore(deps): update dependency tornado to v6.5 [security] (#2478) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 848641a85f0f4d912839d3220a5a54cba70d0dd5 Author: david-cortes-intel <david.cortes@intel.com> Date: Fri May 16 15:50:04 2025 +0200 DOC: More details for conda installs (#2475) * add conda-forge channel for dependencies, mention incompatibilities with anaconda * update commands also in .md file * suggest impi install from conda-forge * remove warning about conda-forge incompatibilities * Update INSTALL.md Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> * Update doc/sources/distributed-mode.rst Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> * Update doc/sources/distributed-mode.rst Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> --------- Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> commit 823daff5c9764f76b3fae091b1368b9104095be5 Author: david-cortes-intel <david.cortes@intel.com> Date: Fri May 16 07:35:52 2025 +0200 DOC: Clarify that SPMD is linux-only (#2476) * clarify that SPMD is not available on windows builds * Update doc/sources/distributed-mode.rst Co-authored-by: yuejiaointel <108152493+yuejiaointel@users.noreply.github.com> --------- Co-authored-by: yuejiaointel <108152493+yuejiaointel@users.noreply.github.com> commit 074fd6035146e741c4a52f549ffb879dc6f458c4 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Wed May 14 14:26:43 2025 -0700 chore(deps): update dependency cmake to v4.0.2 (#2468) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit bcc3b332a8c23d6c83e446d4f3973bf7f54b2e2d Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Wed May 14 08:43:37 2025 -0700 chore(deps): update dependency cython to v3.1.0 (#2470) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 07a91a612893644cef13e561858253c732b2f264 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Wed May 14 08:41:55 2025 -0700 chore(deps): update dependency xgboost to v3.0.1 (#2474) * chore(deps): update dependency xgboost to v3.0.1 * Update requirements-test.txt --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> commit 165c6d324de61a749144c15b6d4eed7610036fe7 Author: Ian Faust <icfaust@gmail.com> Date: Wed May 14 17:32:40 2025 +0200 [enhancement] add ```__dlpack__``` and ```__dlpack_device__``` attributes to python oneDAL table class (#2430) * initial save * save point * interim stop * check: * fix most problems * save point * formatting * clang-formatting and save point * add testing * address coverage for dlpack::free_capsule * formatting * add gc and static_cast * remove comment * add suggestion commit 450abf41de3481d7623fa0b67aaec6cc24d0be78 Author: Ian Faust <icfaust@gmail.com> Date: Wed May 14 16:49:03 2025 +0200 [enhancement, CI] add numpydoc validation to pre-commit (#2455) * Update .pre-commit-config.yaml * Update .pre-commit-config.yaml * Update pyproject.toml * Update pyproject.toml * Update pyproject.toml * Update .pre-commit-config.yaml * Update .pre-commit-config.yaml * Update pyproject.toml * Update pyproject.toml * Update dispatcher.py * Update dispatcher.py * Update .pre-commit-config.yaml * Update pyproject.toml * Update pyproject.toml * Update incremental_basic_statistics.py * Update incremental_linear.py * Update incremental_linear.py * Update incremental_linear.py * Update _device_offload.py * Update incremental_basic_statistics.py * Update incremental_basic_statistics.py * Update basic_statistics.py * Update incremental_pca.py * Update incremental_linear_model.py * Update incremental_covariance.py * Update incremental_ridge.py * Update incremental_linear.py * Update incremental_ridge.py * make fixes * Update _config.py * Update _config.py * Update _config.py * Update _backend.py * Update _dpep_helpers.py * Update _dpep_helpers.py * Update kernel_functions.py * Update kernel_functions.py * Update kernel_functions.py * Update kernel_functions.py * Update kernel_functions.py * Update kernel_functions.py * Update svm.py * Update _data_conversion.py * Update _data_conversion.py * Update _data_conversion.py * Update __init__.py * Update __init__.py * Update __init__.py * Update _device_offload.py * Update _device_offload.py * Update covariance.py * Update incremental_covariance.py * Update incremental_covariance.py * Update incremental_linear_model.py * Update incremental_linear_model.py * Update incremental_linear_model.py * Update linear_model.py * Update linear_model.py * Update linear_model.py * Update linear_model.py * Update incremental_basic_statistics.py * Update kmeans.py * Update pca.py * Update basic_statistics.py * Update basic_statistics.py * Update basic_statistics.py * Update basic_statistics.py * Update incremental_pca.py * Update basic_statistics.py * Update incremental_pca.py * Update logistic_regression.py * Update incremental_pca.py * Update _config.py * Update _config.py * Update _device_offload.py * Update _device_offload.py * Update _device_offload.py * Update _device_offload.py * Update validation.py * Update _sycl_queue_manager.py * Update _sycl_queue_manager.py * Update _sycl_queue_manager.py * Update _sycl_queue_manager.py * Update _backend.py * Update _utils.py * Update _utils.py * Update _utils.py * Update _utils.py * Update _utils.py * Apply suggestions from code review Co-authored-by: david-cortes-intel <david.cortes@intel.com> * Update _utils.py * Update _device_offload.py * Apply suggestions from code review Co-authored-by: david-cortes-intel <david.cortes@intel.com> --------- Co-authored-by: david-cortes-intel <david.cortes@intel.com> commit c2b5cfeeca9de591799217f05dd11a01143c258d Author: david-cortes-intel <david.cortes@intel.com> Date: Wed May 14 13:36:24 2025 +0200 ENH: Enable model conversion from TreeLite (#2452) * add conversion from treelite * add dependency also for conda commit 211e1278c64abf00a331c2ad20c87a27d3141bb8 Author: david-cortes-intel <david.cortes@intel.com> Date: Mon May 12 09:04:04 2025 +0200 revert location of versions.json (#2472) commit 18bfe50653fb8c272d09b18ea975f80f7394524c Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Thu May 8 15:12:55 2025 -0700 chore(deps): update dependency snowballstemmer to v3 (#2469) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit cd5615bd534804d6fa286dc6688bd2492585822c Author: yuejiaointel <108152493+yuejiaointel@users.noreply.github.com> Date: Wed May 7 23:03:09 2025 -0700 feature: check dead links in doc CI (#2460) * feature: one liner to check dead links * fix: check rate limit after build * fix: rate error * fix: ignore intel.com links * fix: remove ignored checks * fix: fix broken links * fix: fix dead link in ipynb files * fix: fix broken links * fix: format and add comment commit 55788926e43f6b0f47ec23beb3dda2eee467fd78 Author: david-cortes-intel <david.cortes@intel.com> Date: Wed May 7 14:29:07 2025 +0200 use sklearn's config for backticks (#2466) commit 70000735011b4856a23768327bcaa3dcef2fc354 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Thu May 1 12:04:22 2025 +0100 Update dependency setuptools to v80.1.0 (#2458) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 200e27323a71142e6b164c647df512fb8c70f148 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Wed Apr 30 14:46:25 2025 +0200 Update dependency setuptools to v80.0.1 (#2457) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 3b8605af5f35c1e53e27cf4a320943bd4aef4b51 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Mon Apr 28 10:38:42 2025 +0100 Update dependency setuptools to v80 (#2456) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> …
1 parent 8e02f50 commit 7b09147

11 files changed

Lines changed: 784 additions & 981 deletions

File tree

deselected_tests.yaml

Lines changed: 130 additions & 344 deletions
Large diffs are not rendered by default.

onedal/cluster/dbscan.py

Lines changed: 43 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,18 @@
1616

1717
import numpy as np
1818

19-
from daal4py.sklearn._utils import get_dtype, make2d
19+
from daal4py.sklearn._utils import make2d
20+
from onedal._device_offload import supports_queue
2021

21-
from ..common._base import BaseEstimator
22+
from .._config import _get_config
23+
from ..common._backend import bind_default_backend
2224
from ..common._mixin import ClusterMixin
23-
from ..datatypes import _convert_to_supported, from_table, to_table
24-
from ..utils import _check_array
25+
from ..datatypes import from_table, to_table
26+
from ..utils._array_api import _get_sycl_namespace
27+
from ..utils.validation import _check_array
2528

2629

27-
class BaseDBSCAN(BaseEstimator, ClusterMixin):
30+
class DBSCAN(ClusterMixin):
2831
def __init__(
2932
self,
3033
eps=0.5,
@@ -46,65 +49,52 @@ def __init__(
4649
self.p = p
4750
self.n_jobs = n_jobs
4851

52+
@bind_default_backend("dbscan.clustering")
53+
def compute(self, params, data_table, weights_table): ...
54+
4955
def _get_onedal_params(self, dtype=np.float32):
5056
return {
51-
"fptype": "float" if dtype == np.float32 else "double",
57+
"fptype": dtype,
5258
"method": "by_default",
5359
"min_observations": int(self.min_samples),
5460
"epsilon": float(self.eps),
5561
"mem_save_mode": False,
5662
"result_options": "core_observation_indices|responses",
5763
}
5864

59-
def _fit(self, X, y, sample_weight, module, queue):
60-
policy = self._get_policy(queue, X)
61-
X = _check_array(X, accept_sparse="csr", dtype=[np.float64, np.float32])
62-
sample_weight = make2d(sample_weight) if sample_weight is not None else None
63-
X = make2d(X)
65+
@supports_queue
66+
def fit(self, X, y=None, sample_weight=None, queue=None):
67+
use_raw_input = _get_config().get("use_raw_input", False) is True
68+
sua_iface, xp, _ = _get_sycl_namespace(X)
69+
70+
if not use_raw_input:
71+
X = _check_array(X, accept_sparse="csr", dtype=[np.float64, np.float32])
72+
X = make2d(X)
73+
elif sua_iface is not None:
74+
queue = X.sycl_queue
75+
76+
X_table, sample_weight_table = to_table(X, sample_weight, queue=queue)
6477

65-
types = [np.float32, np.float64]
66-
if get_dtype(X) not in types:
67-
X = X.astype(np.float64)
68-
X = _convert_to_supported(policy, X)
69-
dtype = get_dtype(X)
70-
params = self._get_onedal_params(dtype)
71-
result = module.compute(policy, params, to_table(X), to_table(sample_weight))
78+
params = self._get_onedal_params(X_table.dtype)
79+
result = self.compute(params, X_table, sample_weight_table)
7280

73-
self.labels_ = from_table(result.responses).ravel()
74-
if result.core_observation_indices is not None:
75-
self.core_sample_indices_ = from_table(
76-
result.core_observation_indices
77-
).ravel()
81+
self.labels_ = xp.squeeze(from_table(result.responses, like=X))
82+
if (
83+
result.core_observation_indices is not None
84+
and not result.core_observation_indices.kind == "empty"
85+
):
86+
self.core_sample_indices_ = xp.squeeze(
87+
from_table(
88+
result.core_observation_indices,
89+
like=X,
90+
)
91+
)
7892
else:
79-
self.core_sample_indices_ = np.array([], dtype=np.intc)
80-
self.components_ = np.take(X, self.core_sample_indices_, axis=0)
93+
# construct keyword arguments for different namespaces (dptcl takes sycl_queue)
94+
kwargs = {"dtype": xp.int32} # always the same
95+
if xp is not np:
96+
kwargs["sycl_queue"] = queue
97+
self.core_sample_indices_ = xp.empty((0,), **kwargs)
98+
self.components_ = xp.take(X, self.core_sample_indices_, axis=0)
8199
self.n_features_in_ = X.shape[1]
82100
return self
83-
84-
85-
class DBSCAN(BaseDBSCAN):
86-
def __init__(
87-
self,
88-
eps=0.5,
89-
*,
90-
min_samples=5,
91-
metric="euclidean",
92-
metric_params=None,
93-
algorithm="auto",
94-
leaf_size=30,
95-
p=None,
96-
n_jobs=None,
97-
):
98-
self.eps = eps
99-
self.min_samples = min_samples
100-
self.metric = metric
101-
self.metric_params = metric_params
102-
self.algorithm = algorithm
103-
self.leaf_size = leaf_size
104-
self.p = p
105-
self.n_jobs = n_jobs
106-
107-
def fit(self, X, y=None, sample_weight=None, queue=None):
108-
return super()._fit(
109-
X, y, sample_weight, self._get_backend("dbscan", "clustering", None), queue
110-
)

onedal/datatypes/_data_conversion.py

Lines changed: 132 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -14,86 +14,142 @@
1414
# limitations under the License.
1515
# ==============================================================================
1616

17-
import warnings
18-
1917
import numpy as np
18+
import scipy.sparse as sp
2019

21-
from daal4py.sklearn._utils import make2d
22-
from onedal import _backend, _is_dpc_backend
23-
24-
from ..utils import _is_csr
25-
26-
try:
27-
import dpctl
28-
import dpctl.tensor as dpt
20+
from onedal import _default_backend as backend
2921

30-
dpctl_available = dpctl.__version__ >= "0.14"
31-
except ImportError:
32-
dpctl_available = False
22+
from ..utils._third_party import is_dpctl_tensor, is_dpnp_ndarray, lazy_import
3323

3424

3525
def _apply_and_pass(func, *args, **kwargs):
3626
if len(args) == 1:
37-
return func(args[0], **kwargs) if len(kwargs) > 0 else func(args[0])
38-
return (
39-
tuple(func(arg, **kwargs) for arg in args)
40-
if len(kwargs) > 0
41-
else tuple(func(arg) for arg in args)
42-
)
43-
44-
45-
def from_table(*args):
46-
return _apply_and_pass(_backend.from_table, *args)
47-
48-
49-
def convert_one_to_table(arg):
50-
if dpctl_available:
51-
if isinstance(arg, dpt.usm_ndarray):
52-
return _backend.dpctl_to_table(arg)
53-
54-
if not _is_csr(arg):
55-
arg = make2d(arg)
56-
return _backend.to_table(arg)
57-
58-
59-
def to_table(*args):
60-
return _apply_and_pass(convert_one_to_table, *args)
61-
62-
63-
if _is_dpc_backend:
64-
from ..common._policy import _HostInteropPolicy
65-
66-
def _convert_to_supported(policy, *data, xp=np):
67-
def func(x):
68-
return x
69-
70-
# CPUs support FP64 by default
71-
if isinstance(policy, _HostInteropPolicy):
72-
return _apply_and_pass(func, *data)
73-
74-
# It can be either SPMD or DPCPP policy
75-
device = policy._queue.sycl_device
76-
77-
def convert_or_pass(x):
78-
if (x is not None) and (x.dtype == xp.float64):
79-
warnings.warn(
80-
"Data will be converted into float32 from "
81-
"float64 because device does not support it",
82-
RuntimeWarning,
83-
)
84-
return xp.astype(x, dtype=xp.float32)
85-
else:
86-
return x
87-
88-
if not device.has_aspect_fp64:
89-
func = convert_or_pass
90-
91-
return _apply_and_pass(func, *data)
92-
93-
else:
94-
95-
def _convert_to_supported(policy, *data, xp=np):
96-
def func(x):
97-
return x
98-
99-
return _apply_and_pass(func, *data)
27+
return func(args[0], **kwargs)
28+
return tuple(map(lambda arg: func(arg, **kwargs), args))
29+
30+
31+
def _convert_one_to_table(arg, queue=None):
32+
# All inputs for table conversion must be array-like or sparse, not scalars
33+
return backend.to_table(np.atleast_2d(arg) if np.isscalar(arg) else arg, queue)
34+
35+
36+
def to_table(*args, queue=None):
37+
"""Create oneDAL tables from scalars and/or arrays.
38+
39+
Parameters
40+
----------
41+
*args : scalar, numpy array, sycl_usm_ndarray, csr_matrix, or csr_array
42+
Arguments to be individually converted to oneDAL tables.
43+
44+
queue : SyclQueue or None, default=None
45+
SYCL Queue object to be associated with the oneDAL tables. Default
46+
value None causes no change in data location or queue.
47+
48+
Returns
49+
-------
50+
tables : oneDAL homogeneous or csr tables
51+
Converted oneDAL tables for scalar, numpy array, sycl_usm_ndarray
52+
and dlpack inputs; oneDAL csr_table for csr_matrix, csr_array.
53+
54+
Notes
55+
-----
56+
Tables will use pointers to the original array data. Scalars
57+
and non-contiguous arrays will be copies. Arrays may be
58+
modified in-place by oneDAL during computation. Transformation
59+
is possible only for data located on CPU and SYCL-enabled Intel
60+
GPUs. Each array may only be of a single data type (i.e. each
61+
must be homogeneous).
62+
"""
63+
return _apply_and_pass(_convert_one_to_table, *args, queue=queue)
64+
65+
66+
@lazy_import("array_api_compat")
67+
def _compat_convert(array_api_compat, array):
68+
return array_api_compat.get_namespace(array).from_dlpack
69+
70+
71+
def return_type_constructor(array):
72+
"""Generate a function for converting oneDAL tables to arrays.
73+
74+
Parameters
75+
----------
76+
array : array-like or None
77+
Python object representing an array instance of the return type
78+
for converting oneDAL tables. Arrays are queried for conversion
79+
namespace when of sycl_usm_array type or array API standard type.
80+
When set to None, will return numpy arrays or scipy csr arrays.
81+
82+
Returns
83+
-------
84+
func : callable
85+
A function which takes in a single table input and returns an array.
86+
"""
87+
if isinstance(array, np.ndarray) or array is None or sp.issparse(array):
88+
func = backend.from_table
89+
elif hasattr(array, "__sycl_usm_array_interface__"):
90+
# oneDAL returns tables without sycl queues for CPU sycl queue inputs.
91+
# This workaround is necessary for the functional preservation
92+
# of the compute-follows-data execution.
93+
device = array.sycl_queue
94+
# Its important to note why the __sycl_usm_array_interface__ is
95+
# prioritized: it provides finer-grained control of SYCL queues and the
96+
# related SYCL devices which are generally unavailable via DLPack
97+
# representations (such as SYCL contexts, SYCL sub-devices, etc.).
98+
if is_dpctl_tensor(array):
99+
xp = array.__array_namespace__()
100+
func = lambda x: (
101+
xp.asarray(x)
102+
if hasattr(x, "__sycl_usm_array_interface__")
103+
else xp.asarray(backend.from_table(x), device=device)
104+
)
105+
elif is_dpnp_ndarray(array):
106+
xp = array._array_obj.__array_namespace__()
107+
from_usm = array._create_from_usm_ndarray
108+
func = lambda x: from_usm(
109+
xp.asarray(x)
110+
if hasattr(x, "__sycl_usm_array_interface__")
111+
else xp.asarray(backend.from_table(x), device=device)
112+
)
113+
elif hasattr(array, "__array_namespace__"):
114+
func = array.__array_namespace__().from_dlpack
115+
else:
116+
try:
117+
func = _compat_convert(array)
118+
except ImportError:
119+
raise TypeError(
120+
"array type is unsupported, but may be made compatible by installing `array_api_compat`"
121+
) from None
122+
return func
123+
124+
125+
def from_table(*args, like=None):
126+
"""Create 2 dimensional arrays from oneDAL tables.
127+
128+
oneDAL tables are converted to numpy ndarrays, dpctl tensors, dpnp
129+
ndarrays, or array API standard arrays of designated type.
130+
131+
Parameters
132+
----------
133+
*args : single or multiple python oneDAL tables
134+
The tables should given as individual arguments.
135+
136+
like : callable, array-like or None, default=None
137+
Python object representing an array instance of the return type
138+
or function capable of converting oneDAL tables into arrays of
139+
desired type. Arrays are queried for conversion namespace when
140+
of sycl_usm_array type or array API standard type. When set to
141+
None, will return numpy arrays or scipy csr arrays.
142+
143+
Returns
144+
-------
145+
arrays : numpy arrays, sycl_usm_ndarrays, or array API standard arrays
146+
Array or tuple of arrays generated from the input oneDAL tables.
147+
148+
Notes
149+
-----
150+
Support for other array types via array_api_compat is possible (e.g.
151+
PyTorch), but requires its installation specifically, as it is imported
152+
only when necessary.
153+
"""
154+
func = like if callable(like) else return_type_constructor(like)
155+
return _apply_and_pass(func, *args)

0 commit comments

Comments
 (0)