scikit-learn-intelex 2024.6.0__py312-none-manylinux1_x86_64.whl → 2024.7.0__py312-none-manylinux1_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of scikit-learn-intelex might be problematic. Click here for more details.

Files changed (55) hide show
  1. {scikit_learn_intelex-2024.6.0.dist-info → scikit_learn_intelex-2024.7.0.dist-info}/METADATA +2 -2
  2. {scikit_learn_intelex-2024.6.0.dist-info → scikit_learn_intelex-2024.7.0.dist-info}/RECORD +55 -41
  3. sklearnex/_config.py +3 -15
  4. sklearnex/_device_offload.py +9 -168
  5. sklearnex/basic_statistics/basic_statistics.py +127 -1
  6. sklearnex/basic_statistics/tests/test_basic_statistics.py +251 -0
  7. sklearnex/basic_statistics/tests/test_incremental_basic_statistics.py +1 -1
  8. sklearnex/cluster/dbscan.py +0 -1
  9. sklearnex/cluster/k_means.py +8 -0
  10. sklearnex/cluster/tests/test_kmeans.py +15 -3
  11. sklearnex/covariance/incremental_covariance.py +64 -13
  12. sklearnex/covariance/tests/test_incremental_covariance.py +35 -0
  13. sklearnex/decomposition/pca.py +25 -1
  14. sklearnex/dispatcher.py +94 -0
  15. sklearnex/ensemble/_forest.py +8 -35
  16. sklearnex/ensemble/tests/test_forest.py +9 -12
  17. sklearnex/linear_model/coordinate_descent.py +13 -0
  18. sklearnex/linear_model/linear.py +2 -34
  19. sklearnex/linear_model/logistic_regression.py +79 -59
  20. sklearnex/linear_model/ridge.py +7 -0
  21. sklearnex/linear_model/tests/test_linear.py +28 -3
  22. sklearnex/linear_model/tests/test_logreg.py +45 -3
  23. sklearnex/manifold/t_sne.py +4 -0
  24. sklearnex/metrics/pairwise.py +5 -0
  25. sklearnex/metrics/ranking.py +3 -0
  26. sklearnex/model_selection/split.py +3 -0
  27. sklearnex/neighbors/_lof.py +9 -0
  28. sklearnex/neighbors/common.py +45 -1
  29. sklearnex/neighbors/knn_classification.py +1 -20
  30. sklearnex/neighbors/knn_regression.py +1 -20
  31. sklearnex/neighbors/knn_unsupervised.py +31 -7
  32. sklearnex/preview/__init__.py +1 -1
  33. sklearnex/preview/linear_model/__init__.py +19 -0
  34. sklearnex/preview/linear_model/ridge.py +419 -0
  35. sklearnex/preview/linear_model/tests/test_ridge.py +102 -0
  36. sklearnex/spmd/basic_statistics/tests/test_basic_statistics_spmd.py +107 -0
  37. sklearnex/spmd/cluster/tests/test_dbscan_spmd.py +97 -0
  38. sklearnex/spmd/cluster/tests/test_kmeans_spmd.py +172 -0
  39. sklearnex/spmd/covariance/tests/test_covariance_spmd.py +107 -0
  40. sklearnex/spmd/decomposition/tests/test_pca_spmd.py +128 -0
  41. sklearnex/spmd/ensemble/tests/test_forest_spmd.py +265 -0
  42. sklearnex/spmd/linear_model/tests/test_linear_regression_spmd.py +145 -0
  43. sklearnex/spmd/linear_model/tests/test_logistic_regression_spmd.py +163 -0
  44. sklearnex/spmd/neighbors/tests/test_neighbors_spmd.py +288 -0
  45. sklearnex/svm/_common.py +19 -21
  46. sklearnex/svm/tests/test_svm.py +12 -20
  47. sklearnex/tests/_utils.py +143 -20
  48. sklearnex/tests/_utils_spmd.py +185 -0
  49. sklearnex/tests/test_config.py +4 -0
  50. sklearnex/tests/test_monkeypatch.py +12 -4
  51. sklearnex/tests/test_patching.py +16 -13
  52. sklearnex/tests/test_run_to_run_stability.py +21 -9
  53. {scikit_learn_intelex-2024.6.0.dist-info → scikit_learn_intelex-2024.7.0.dist-info}/LICENSE.txt +0 -0
  54. {scikit_learn_intelex-2024.6.0.dist-info → scikit_learn_intelex-2024.7.0.dist-info}/WHEEL +0 -0
  55. {scikit_learn_intelex-2024.6.0.dist-info → scikit_learn_intelex-2024.7.0.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: scikit-learn-intelex
3
- Version: 2024.6.0
3
+ Version: 2024.7.0
4
4
  Summary: Intel(R) Extension for Scikit-learn is a seamless way to speed up your Scikit-learn application.
5
5
  Home-page: https://github.com/intel/scikit-learn-intelex
6
6
  Author: Intel Corporation
@@ -31,7 +31,7 @@ Classifier: Topic :: Software Development
31
31
  Requires-Python: >=3.7
32
32
  Description-Content-Type: text/markdown
33
33
  License-File: LICENSE.txt
34
- Requires-Dist: daal4py (==2024.6.0)
34
+ Requires-Dist: daal4py (==2024.7.0)
35
35
  Requires-Dist: scikit-learn (>=0.22)
36
36
 
37
37
 
@@ -1,59 +1,60 @@
1
1
  sklearnex/__init__.py,sha256=DVpGCMMQcUlrOGj_iy1jk3ZhCfa0_TFISYLqaUDRqC0,1780
2
2
  sklearnex/__main__.py,sha256=Le9BJq6aLEGSSoZwJLsOADxsV89ynBfA8BcoJHk9F24,1921
3
- sklearnex/_config.py,sha256=6WS3UuS4-0DxIJyGn7yQMosj-mGkLybLQrg3W7dED5o,3928
4
- sklearnex/_device_offload.py,sha256=m8Hspffwx6Tn3f-OYLqwf5cUCKq4vZ3aSLmhY92qp08,8876
3
+ sklearnex/_config.py,sha256=38wvKg2wG79ZctkvICl-Ay7hy8InXdR0t-P3n3h1NUs,3613
4
+ sklearnex/_device_offload.py,sha256=h5lw46OS2shk5w3Nd-1Dk2eb4jV2eq5oTl3RtR7Xusc,3456
5
5
  sklearnex/_utils.py,sha256=EV4jC3plVdndsgrfPBsJZTzggrRdYWLwOpoIRWtTXt4,3812
6
6
  sklearnex/conftest.py,sha256=ODuhlscC0HNGXiA8olEfHTDULzjevqG9_sn0yMGRkHg,2376
7
- sklearnex/dispatcher.py,sha256=XElvy9dDJ8XNOci8asKUnWXJpr6JROXHehdWBc_od3g,15876
7
+ sklearnex/dispatcher.py,sha256=xxIcQ6YLSW37bvaDitlqE7qBeKfZx-c7cPAXGLNjbhk,18695
8
8
  sklearnex/basic_statistics/__init__.py,sha256=-lNh54F2FO0BuHDBLjhW7zp3yBcgFZ-DrXHj2H5hLXE,920
9
- sklearnex/basic_statistics/basic_statistics.py,sha256=j5jBZ3DgXjoyjCBEFfYQHyl3LgLXEWWFnNHwInThdZw,796
9
+ sklearnex/basic_statistics/basic_statistics.py,sha256=1U_60TqIaNoWxA6XX1LQf18PP-1oOEjkyrskTBFBS7g,5482
10
10
  sklearnex/basic_statistics/incremental_basic_statistics.py,sha256=NNWF9zdxBz2jT7dzt5hL6HRvjQIGosvViQE3KJMF1L4,10048
11
- sklearnex/basic_statistics/tests/test_incremental_basic_statistics.py,sha256=zTb_04DBGYSfwcpRaP0OJzi4Z6jz4jqV_kDRAp1x-no,14926
11
+ sklearnex/basic_statistics/tests/test_basic_statistics.py,sha256=dsJCHOPdjwZt5Kod1VdD8sdQrpoabPPUJNGN5S8cVvU,9533
12
+ sklearnex/basic_statistics/tests/test_incremental_basic_statistics.py,sha256=0a5zE0iMzAQMiRyKTpcvQjGHBM86aNhnQZ0l_Ry1fNY,14914
12
13
  sklearnex/cluster/__init__.py,sha256=TsDzdbKzEubaP86iY8a7mSW0ZQzgjzGYuPkhc5lZmlQ,853
13
- sklearnex/cluster/dbscan.py,sha256=EiAMRZq53KhGQ_d4_c867-frgG-pz8S1J88vd8hLAn4,6844
14
- sklearnex/cluster/k_means.py,sha256=1QKcFUQcnycu8kSD8uYSaDIuedHbxZsV_gvUfcEwVAM,806
14
+ sklearnex/cluster/dbscan.py,sha256=hpP-R2VTdeXjyoZkSw8AegdGtEa2kRt2KHIokZNHFXo,6824
15
+ sklearnex/cluster/k_means.py,sha256=vo9NXztaphr3LWdsnwqPndycIbFsispSD2QldInyGRw,1262
15
16
  sklearnex/cluster/tests/test_dbscan.py,sha256=JYpwyuPkGQHdbE_IPbQv4qNj7clMm4UPdz_lrpRzKXE,1504
16
- sklearnex/cluster/tests/test_kmeans.py,sha256=H3a9NSHRRSASo0Eceo44Kjq6GwEoMqMzcubaNt1s1QQ,1213
17
+ sklearnex/cluster/tests/test_kmeans.py,sha256=TCPlrO0hrFkP3Aba_sHe2ZEAR0q16_YCLFMBBymQjdI,1643
17
18
  sklearnex/covariance/__init__.py,sha256=_c86wiKDGBH50ofN-_tn7lO4M2YVEWO5AHhJIfimUDk,859
18
- sklearnex/covariance/incremental_covariance.py,sha256=0MvYlGnmuZ8_kRBaIkMzg3RyGdcSMjO-I7dhw2VpTsg,11010
19
- sklearnex/covariance/tests/test_incremental_covariance.py,sha256=ZbEfup4ICm278RW4hZIHPciOiqhFhx_k1l3lpnw0M6s,6763
19
+ sklearnex/covariance/incremental_covariance.py,sha256=JnB6On_9MvDsNcDsSIb-4G9P38cx2A2qmomO3XjVi5I,13045
20
+ sklearnex/covariance/tests/test_incremental_covariance.py,sha256=mhH66DSlqBweySB3HZ4a9GQhz_a8BngB0HQSQkJ5Oc8,8010
20
21
  sklearnex/decomposition/__init__.py,sha256=RJBYDWyvnn5DA-j5r4IqVdXLp6H4mdPySsSjnXhlv-U,805
21
- sklearnex/decomposition/pca.py,sha256=JkyxsSz_8vVGUjJrfxyAwwY1Yf2uht-qxwOisEHv9mY,15550
22
+ sklearnex/decomposition/pca.py,sha256=eoNighcTXtuVbH4KP1fBaHbAUUBLup2Bqbjd5fs_J1Q,16586
22
23
  sklearnex/decomposition/tests/test_pca.py,sha256=EoCgpSojE2S2e7hOUwW0Bh3vVGTUywawAhU7ThVAlW0,2319
23
24
  sklearnex/doc/third-party-programs.txt,sha256=qA1XbOqYkMRnp29p8VxXjfcH0kHE8NSO5s2heea83-8,21773
24
25
  sklearnex/ensemble/__init__.py,sha256=2xB2KfG7l7uJv0p3kfVhrs4KLM174SCsigZhYqwSYAA,1035
25
- sklearnex/ensemble/_forest.py,sha256=tElkh0jezrp9QK2T3_kDCgye6El9W6hOlJepaeMIOM4,73494
26
- sklearnex/ensemble/tests/test_forest.py,sha256=UXj6pfSuOr8wm_KZciyE9zt6hh-we1U8s0XU9bShqHI,4735
26
+ sklearnex/ensemble/_forest.py,sha256=J3TN37gIIuWkPrVTY8xLKQNh4Xr3LSi7wAH7zCsl9X0,72353
27
+ sklearnex/ensemble/tests/test_forest.py,sha256=uBpxWlhIOkaSzfd_nS6Ui0O7PcS-fVDzB5my2WQWOi0,4843
27
28
  sklearnex/glob/__main__.py,sha256=--FAjkhh5E6a1TFOGu6_BM3MHe78jP8oSpl0xKiRtTI,2531
28
29
  sklearnex/glob/dispatcher.py,sha256=o6XKGKM3M91F7FlXBOt1IhnpWQK4R1VY2WS-0uIghcw,3906
29
30
  sklearnex/linear_model/__init__.py,sha256=mzZ0EaBhDH66ETNt2vylznSoZbCYexgL2qE_jKppYYc,1144
30
- sklearnex/linear_model/coordinate_descent.py,sha256=uZOHIKfFlHoMlNXZCh2MAnZE30fRZlmtcF7UsZQ3Vq4,822
31
+ sklearnex/linear_model/coordinate_descent.py,sha256=h7ATAXbLTPisnRRQjt4nZiFzRjR53F2M_XSeZi_pFNw,1547
31
32
  sklearnex/linear_model/incremental_linear.py,sha256=iDad4Z4xMDImvG-Jgtt0Hz3Qp9MVhSi-IjUPcV0Y_ks,16101
32
- sklearnex/linear_model/linear.py,sha256=SUoFFvpl4Eb308sYBp6FNbZls-4G69eg8wSeuPs0oAg,11765
33
+ sklearnex/linear_model/linear.py,sha256=BDexE22Nl6egzHoMiruBp6L_biUfy0eWaZWbHMG9rJc,10740
33
34
  sklearnex/linear_model/logistic_path.py,sha256=Nq3JPXSzE4bjamnP3gGQtsMKks2v7s6bSiuYRnFqrRw,849
34
- sklearnex/linear_model/logistic_regression.py,sha256=jmsNs7MYHm-PncuG20m_TSqXbM5jXx_vHsoH-hReEFQ,14271
35
- sklearnex/linear_model/ridge.py,sha256=0oxlM5McYYvl0KxK9OIGJKM6lOADuFSPTdfx-efJNTI,810
35
+ sklearnex/linear_model/logistic_regression.py,sha256=e7tZhQX6URfoyuZ5OweiGGgTY19vfMrGGH02qiTXT0M,14881
36
+ sklearnex/linear_model/ridge.py,sha256=ZrBcYGylPMRqFj3jUvJ7nQAioh8YbvCd8CttJlx1RgM,1183
36
37
  sklearnex/linear_model/tests/test_incremental_linear.py,sha256=e0ZADjB0myq1QcdwYxlVYl6tGFs4tVZIfBoV1xkdFuw,7337
37
- sklearnex/linear_model/tests/test_linear.py,sha256=9YQgyYmcGSL2rEgIfhZZxTIlj5v-Z6-ygBqYR6ly3oE,4357
38
- sklearnex/linear_model/tests/test_logreg.py,sha256=mUYDwTDUekERlzxjnVeOeCUcNv4KJAXdTIiELZNSaDc,3283
38
+ sklearnex/linear_model/tests/test_linear.py,sha256=7PN4sCZ0bdcknKPdxoV0WtFg__-GHm_0PeNVOAz6HGY,5553
39
+ sklearnex/linear_model/tests/test_logreg.py,sha256=h_5X-IeKDE7TOSyCiP05WEa4ZbnZIQZ66Nwz9r8NzdM,4881
39
40
  sklearnex/manifold/__init__.py,sha256=3FU5fY1YvHAyNeSlUHsZfPnAbvlAUtZpum0Obmok2KE,809
40
- sklearnex/manifold/t_sne.py,sha256=U6F_dGB6taVuEJvTnVBWD-sri3x3m0Khu3HI4wXidhg,805
41
+ sklearnex/manifold/t_sne.py,sha256=EsyViHWIGt5vzHDUkGXBF3LGO6g10503ENLIHvdiv_Q,1005
41
42
  sklearnex/manifold/tests/test_tsne.py,sha256=SNqe1yg45mL4qIsxpX5hDpBsIyrv9r__6wfrerjp3yU,1063
42
43
  sklearnex/metrics/__init__.py,sha256=EHOCTU9RERa0Rrkr4dgmyO9ippbN5kjH_FwK3BqIROc,907
43
- sklearnex/metrics/pairwise.py,sha256=5T_Vcbiadzi7oo0hq6vLl_BHQzXOmDsn5pHaMCPSHd8,818
44
- sklearnex/metrics/ranking.py,sha256=rjJxQntblbegSZRwDsOOy2ntIYBqlnV8NM46IAc0MiE,813
44
+ sklearnex/metrics/pairwise.py,sha256=OVbb4F-NdHDIfxf9ThkZXD1wqIaFTOZ1J-_EEYIlv90,980
45
+ sklearnex/metrics/ranking.py,sha256=ktFsbK6ILIQTwHM134KOf5MNTo0DoJYzfxV8GMHjRr8,957
45
46
  sklearnex/metrics/tests/test_metrics.py,sha256=Nwfz8UV4V4fKLLY7f9P9eg8uY09xLXaFx1GC49TOiA8,1579
46
47
  sklearnex/model_selection/__init__.py,sha256=64045Y-nzLDBepO6IRjt88LhL2DM3KdvpCF2vvj_RpA,842
47
- sklearnex/model_selection/split.py,sha256=qjmy8sRf_QEG8LhT0ivn_tICMCYmt7ffZZV1-rLQnko,824
48
+ sklearnex/model_selection/split.py,sha256=IdUeCJghfifj5n2VCoxXfbHtIIRBaimyOEixB_UUKbM,974
48
49
  sklearnex/model_selection/tests/test_model_selection.py,sha256=3kZIq8kba8SW93DBWXupoRymNStR1_mGGYSErQRnwME,1338
49
50
  sklearnex/neighbors/__init__.py,sha256=_GMJ2L-6YechRYI2fOFwHjy0kebUncE81z4FmdXUlb8,1078
50
- sklearnex/neighbors/_lof.py,sha256=5MPkWIb6FS55Q8xWzgc22Ec_PsouuN94SPovt-vsBGE,8648
51
- sklearnex/neighbors/common.py,sha256=8DxDoYtXtEM4RNoMCimpTVSDOOxUIJlNVOQvBXBhkd4,10875
52
- sklearnex/neighbors/knn_classification.py,sha256=ONoBbtwb5xoVLcpg5COpRNu1ZBOQ2EDh03RzbWDy5yo,8537
53
- sklearnex/neighbors/knn_regression.py,sha256=ge8VAMa8aJ58M5ccN5NMILFHuRYtYKzyoLF8fxxgGfo,7462
54
- sklearnex/neighbors/knn_unsupervised.py,sha256=qkj-hSEq8QetYsWlofnik3PpFvo1iBUbIOhywo8wFWk,5362
51
+ sklearnex/neighbors/_lof.py,sha256=AtmBVdYBUpk7kqDNXbtvBNWkGNcmE0Lq_VtFgjelwhE,9120
52
+ sklearnex/neighbors/common.py,sha256=G79Ifl656rSOHDoBWhBMoqBUer65BOeLFWo9ttdEpEU,12527
53
+ sklearnex/neighbors/knn_classification.py,sha256=EJAColAfBUpUuBxBhWD3XmMDFqlPcgIotQa4RoJsdfU,7835
54
+ sklearnex/neighbors/knn_regression.py,sha256=eKVqlEB-S2dPgeq8BOzaZwqPnKR2ZNeUBlvJkSSCUlg,6779
55
+ sklearnex/neighbors/knn_unsupervised.py,sha256=GhvVlvcarq681OYHkmWqJ16z62HW_kAkDsrf6KErXmU,6067
55
56
  sklearnex/neighbors/tests/test_neighbors.py,sha256=yAlMnLt9GrdT6Ceph5B7iFuMJXpDURiHWTE99oO8EDw,3417
56
- sklearnex/preview/__init__.py,sha256=1QcbV6xCSP7QCXRxYLVPc_b4lxE0cQiyTrMm4xOnosM,797
57
+ sklearnex/preview/__init__.py,sha256=hZfIgTkkkUVaQ-SKaqI-S_SiXCkUzCUYxpSnbrhhEJU,813
57
58
  sklearnex/preview/cluster/__init__.py,sha256=FONzOuTGAb5NwdfFhLco99P_VccRk9NBkDHU3EKuAIs,794
58
59
  sklearnex/preview/cluster/_common.py,sha256=bgpzijxgyrAtdNCCHyCNsZ-N70KQYNwMuoCTNdUna6o,2718
59
60
  sklearnex/preview/cluster/k_means.py,sha256=RdF9mwgvZ1xgyeLhCQA2WaPvPsS1ndktXXcaNj6S460,10464
@@ -63,46 +64,59 @@ sklearnex/preview/covariance/tests/test_covariance.py,sha256=FOgvhJxFQo9sNG4Uo-e
63
64
  sklearnex/preview/decomposition/__init__.py,sha256=9VcJPWKgSrWDFEXUY6ZCpAT2XGbOVA4a1j_XgfJBnTM,839
64
65
  sklearnex/preview/decomposition/incremental_pca.py,sha256=SsY1-AQt0mFTJGP5yzVxZvopNz2tSeXUO9p9c_3uVus,7820
65
66
  sklearnex/preview/decomposition/tests/test_incremental_pca.py,sha256=tsAlM18nzfIQxic7Ry986Ue0ovUdbopWFNckqQLK5xU,10776
67
+ sklearnex/preview/linear_model/__init__.py,sha256=azZix9bU9zjwl12g0gB_K5RiVPJvkrinHHCwqVTLQLY,792
68
+ sklearnex/preview/linear_model/ridge.py,sha256=SmUYSeBrBALJQUxsD3h4bWxuhU4oO7JhLGNnS3hxb1w,15343
69
+ sklearnex/preview/linear_model/tests/test_ridge.py,sha256=Ru6D9fY2o6bXyxSeUo6O7sHF8jKHX30J545yBk0LRSo,4056
66
70
  sklearnex/spmd/__init__.py,sha256=ChQy2kEWlo4KGvs0RnbPoPEVhdgl8URV099B1rZtF5Y,889
67
71
  sklearnex/spmd/basic_statistics/__init__.py,sha256=NA5RGlwcp27UEeCgz0ngzYYd3MAIRpxlTy86uhM2-RE,821
68
72
  sklearnex/spmd/basic_statistics/basic_statistics.py,sha256=_dQ9mhVYxeuChATEpAmHpXDpgW3YvtK1qrG-kLr2MtI,886
73
+ sklearnex/spmd/basic_statistics/tests/test_basic_statistics_spmd.py,sha256=I-VV-JTCR7Pu5Z36XtRxoLY6EUoeNp62DmM0vPu-NGY,3787
69
74
  sklearnex/spmd/cluster/__init__.py,sha256=qBBfrCHh6_82EROLbu54XKk7SmmRwS1XJyCj0zwkoUw,1029
70
75
  sklearnex/spmd/cluster/dbscan.py,sha256=23YNzPhx4MZijU0md-E3ZkHpTkhUh5cmtS3loHe-KhI,1824
71
76
  sklearnex/spmd/cluster/kmeans.py,sha256=Rnb9tr9LXVto5vCAumk7ZJfa9BYYDhdD1qUWL-QK5bY,868
77
+ sklearnex/spmd/cluster/tests/test_dbscan_spmd.py,sha256=lGh7tWhoQaYMrwS3_BWcUkX2-GjsstWjLRw4JxMQgGA,3494
78
+ sklearnex/spmd/cluster/tests/test_kmeans_spmd.py,sha256=ll4WL1TJDuLg-t3-Qvcl18J9uZLBJHEraf5jH3HQBKQ,5857
72
79
  sklearnex/spmd/covariance/__init__.py,sha256=5xeL1REMIxCv5M1ya99GGKaVjctUngboZ3uXgxcZ04o,823
73
80
  sklearnex/spmd/covariance/covariance.py,sha256=_oIlr1W1vqDHqIPnsCb04HcBCen5oBHQr5-_n9OSvIA,884
81
+ sklearnex/spmd/covariance/tests/test_covariance_spmd.py,sha256=xH4jZ2F77KqVGYK5fyHTM28xNew7qN814lHAfrY1f50,3918
74
82
  sklearnex/spmd/decomposition/__init__.py,sha256=dBh0ZMIiaqdf3DKbt8FWNB2K9Iacs395m8OxaDFQg_M,784
75
83
  sklearnex/spmd/decomposition/pca.py,sha256=CUrsVD2jae-A9H8RB_emza_fe82CwnFa5PEy0fW_EZ8,871
84
+ sklearnex/spmd/decomposition/tests/test_pca_spmd.py,sha256=9OktZfMTGz5fZfPLBSdOcDKtkcKl7I06CbLnqDajtW4,4709
76
85
  sklearnex/spmd/ensemble/__init__.py,sha256=B3yi7hWoVogMIiw0QRT_x5atsAFS-OO72YPLGeUQJ8M,873
77
86
  sklearnex/spmd/ensemble/forest.py,sha256=vIJJd10wIigFMtJMsiNDNLJ_PP2om-60zpQY_fd11-U,2909
87
+ sklearnex/spmd/ensemble/tests/test_forest_spmd.py,sha256=YOE2sDXWvVHAPj4sswc8iPuWgnXzUSl_AKXDlN1w4zM,9245
78
88
  sklearnex/spmd/linear_model/__init__.py,sha256=WwqCr2DOyUnkSIHlP0yq0UI2yFDgSl5MHV7wu3QGJtA,893
79
89
  sklearnex/spmd/linear_model/linear_model.py,sha256=7QPCIQTWKBiZBTDZZbpZXi-REgxQCfRMt6rHPJAnc5E,883
80
90
  sklearnex/spmd/linear_model/logistic_regression.py,sha256=q_HkfWcg0RgFbk2t9FeV0ZY28HHAOtkGEnUj4tLuwt4,885
91
+ sklearnex/spmd/linear_model/tests/test_linear_regression_spmd.py,sha256=l9bC5gDTNAS2QqZwUAgdbgG0GPvvQOT9XuyqajoAvic,5202
92
+ sklearnex/spmd/linear_model/tests/test_logistic_regression_spmd.py,sha256=NweDwFyElY5HSwGRLH8IPNFqSnvynPCvQ97OFFe6Z68,6187
81
93
  sklearnex/spmd/neighbors/__init__.py,sha256=S16sH8N_18LN_8AgC_wGK5EDSNyuN-F-gI6GVlaiWVE,906
82
94
  sklearnex/spmd/neighbors/neighbors.py,sha256=SiKAS_RVt34MUcGytBS5pHnI_5vFNxJn8jqt1MOhDh8,940
95
+ sklearnex/spmd/neighbors/tests/test_neighbors_spmd.py,sha256=aetHv4hdun2FaaHJTokCLc02szhkp0Yi552EdfboWeA,10488
83
96
  sklearnex/svm/__init__.py,sha256=f3e4ZFwZfx6MsXsn94VK1xVm6mWKT5XCiHczo6zNyAQ,1057
84
- sklearnex/svm/_common.py,sha256=wH4LT6QIoe7xM3btaUBC7fpKJcqKLfNHJj16rAaEZ1k,12797
97
+ sklearnex/svm/_common.py,sha256=2ml2e44mWvAufo6wCoJX3w6RbNON3OnyCaykZX0nkr8,12700
85
98
  sklearnex/svm/nusvc.py,sha256=-SfYz2bUMLaosYg_qeTBYf1Ra-bFuGmI62xIerf3XeE,11262
86
99
  sklearnex/svm/nusvr.py,sha256=9nbRaPCoDQ5SBGH_jLgcaX_PWGDh667w-gW5X2YbHBM,4764
87
100
  sklearnex/svm/svc.py,sha256=fZ9oVpKkgH5OYBXo4mPdZ-8cP07hSzPHoJsyItpXmcQ,12470
88
101
  sklearnex/svm/svr.py,sha256=NIWVUu7NjV4Fe4L-Y4vIqd3KePFdMJ1-jupeH4ZvNsg,4733
89
- sklearnex/svm/tests/test_svm.py,sha256=Ru-aGNGCsRJts7SEEYbnKcVqUx-DqPyUtw-hEoMVpW8,4190
90
- sklearnex/tests/_utils.py,sha256=zRNpggSrZs4H0L-__UuiYRPm_ASqrqWm226ZQzlBQ7I,6252
102
+ sklearnex/svm/tests/test_svm.py,sha256=KnjWVfmHzU0sJqlhDdfLdhFJA_BV_tULPqNlOLXShXg,4194
103
+ sklearnex/tests/_utils.py,sha256=rkZhH5VbMAIBBLBm2Mi5y5DQ_wMXQUq2LqR5X4wcEK0,10556
104
+ sklearnex/tests/_utils_spmd.py,sha256=Kj6TdQXHyCUcI43H2qjcySyuHt4oy6OEqvX8BC8BiyM,6909
91
105
  sklearnex/tests/test_common.py,sha256=MYx0y7oomArxWu9qe2zNs7YL-ScPGFnzvw8PZ1or04A,1813
92
- sklearnex/tests/test_config.py,sha256=SnSJjxAAysISDyC3bYKSJiRHStkB9X-yjLeF11LpRog,1372
106
+ sklearnex/tests/test_config.py,sha256=9ek00NtpWSU7HXNqXXM1kFX09FFS8DCHejVIFMii6kM,1540
93
107
  sklearnex/tests/test_memory_usage.py,sha256=FTtQgaa7p5ScDGscB93LkpU4B3DzfqnVMi84b2vSL30,10957
94
- sklearnex/tests/test_monkeypatch.py,sha256=_9s_4jFvbttOf8uCuBrS4rn_AzQdFlKyRlthnGacUcU,9669
108
+ sklearnex/tests/test_monkeypatch.py,sha256=Qeq0Z84UMKLEAVoQP7WEScouf6gNPbp21fjQ2erxMQo,9962
95
109
  sklearnex/tests/test_n_jobs_support.py,sha256=NziTP4GwZEDoBe1CDvhHZnp8JpwjYQmCNvXEDfS7Wo4,4313
96
110
  sklearnex/tests/test_parallel.py,sha256=0zzlh2VJZWcHw5W4QSUthtAygOb6K0Bg1ekNsrdGJQE,1770
97
- sklearnex/tests/test_patching.py,sha256=LKi-x0ELu_y5HEa86UYhDzOalJphiEBtEe5own89PEs,14782
98
- sklearnex/tests/test_run_to_run_stability.py,sha256=49WnqTcAaGGa5eP7RBwEePvr_dA9hfYsCK4-pZA8OPw,9984
111
+ sklearnex/tests/test_patching.py,sha256=_-0IZ8n0tim0GRpZECzecOPebUUVmfKBA0yOUc7hbCw,14958
112
+ sklearnex/tests/test_run_to_run_stability.py,sha256=Q4O7l1_0O4tZ_SM3kW1OxcOCuB73ugX_I4GZMi3Lrdg,10735
99
113
  sklearnex/utils/__init__.py,sha256=FFlM8zc2qnSdPYpLjSt4Ma_9FjC8qk8wXJa-5B8hCs0,898
100
114
  sklearnex/utils/_namespace.py,sha256=ohr8gOgEFgrccLecllMVYQPqbqqyye9uT-cWLtyxHFs,3167
101
115
  sklearnex/utils/parallel.py,sha256=VBcS-KUdyq7XpJUN6ygmNjyWtYLroghbvCxQ8nVU3YI,2085
102
116
  sklearnex/utils/validation.py,sha256=fjfhQiKnBQnD7LCBlacMyvsrhGnlMLRXk5Q69uoZIP4,827
103
117
  sklearnex/utils/tests/test_finite.py,sha256=AzJRY71X0VvDUicUI8Ey9Le6_yKp5O-3ZikhDVJNWms,2943
104
- scikit_learn_intelex-2024.6.0.dist-info/LICENSE.txt,sha256=7micbUpzQXphq9e_2oL7PpZcvoXzPuQHIDEXyKXC81s,10797
105
- scikit_learn_intelex-2024.6.0.dist-info/METADATA,sha256=HAyHGB0wdXHb5FaRHSiitrRZgs5yDtXkjfAigVtQJxA,12449
106
- scikit_learn_intelex-2024.6.0.dist-info/WHEEL,sha256=wKn5R5EEXodawgFUpV0Un8G_w3mugUfWciAZCmvm4qc,108
107
- scikit_learn_intelex-2024.6.0.dist-info/top_level.txt,sha256=kzKChSWGJEYFmdj5PwE63HNuP_PVOhWfD32ytH9rL9Q,10
108
- scikit_learn_intelex-2024.6.0.dist-info/RECORD,,
118
+ scikit_learn_intelex-2024.7.0.dist-info/LICENSE.txt,sha256=7micbUpzQXphq9e_2oL7PpZcvoXzPuQHIDEXyKXC81s,10797
119
+ scikit_learn_intelex-2024.7.0.dist-info/METADATA,sha256=3bnFVcELT6fXGuuN7F6toAcw45_HPE_sh7s-_mvdnPQ,12449
120
+ scikit_learn_intelex-2024.7.0.dist-info/WHEEL,sha256=wKn5R5EEXodawgFUpV0Un8G_w3mugUfWciAZCmvm4qc,108
121
+ scikit_learn_intelex-2024.7.0.dist-info/top_level.txt,sha256=kzKChSWGJEYFmdj5PwE63HNuP_PVOhWfD32ytH9rL9Q,10
122
+ scikit_learn_intelex-2024.7.0.dist-info/RECORD,,
sklearnex/_config.py CHANGED
@@ -14,24 +14,12 @@
14
14
  # limitations under the License.
15
15
  # ==============================================================================
16
16
 
17
- import threading
18
17
  from contextlib import contextmanager
19
18
 
20
19
  from sklearn import get_config as skl_get_config
21
20
  from sklearn import set_config as skl_set_config
22
21
 
23
- _default_global_config = {
24
- "target_offload": "auto",
25
- "allow_fallback_to_host": False,
26
- }
27
-
28
- _threadlocal = threading.local()
29
-
30
-
31
- def _get_sklearnex_threadlocal_config():
32
- if not hasattr(_threadlocal, "global_config"):
33
- _threadlocal.global_config = _default_global_config.copy()
34
- return _threadlocal.global_config
22
+ from onedal._config import _get_config as onedal_get_config
35
23
 
36
24
 
37
25
  def get_config():
@@ -46,7 +34,7 @@ def get_config():
46
34
  set_config : Set global configuration.
47
35
  """
48
36
  sklearn = skl_get_config()
49
- sklearnex = _get_sklearnex_threadlocal_config().copy()
37
+ sklearnex = onedal_get_config()
50
38
  return {**sklearn, **sklearnex}
51
39
 
52
40
 
@@ -70,7 +58,7 @@ def set_config(target_offload=None, allow_fallback_to_host=None, **sklearn_confi
70
58
  """
71
59
  skl_set_config(**sklearn_configs)
72
60
 
73
- local_config = _get_sklearnex_threadlocal_config()
61
+ local_config = onedal_get_config(copy=False)
74
62
 
75
63
  if target_offload is not None:
76
64
  local_config["target_offload"] = target_offload
@@ -14,141 +14,21 @@
14
14
  # limitations under the License.
15
15
  # ==============================================================================
16
16
 
17
- import logging
18
- import sys
19
- from collections.abc import Iterable
20
17
  from functools import wraps
21
18
 
22
- import numpy as np
19
+ from onedal._device_offload import (
20
+ _copy_to_usm,
21
+ _get_global_queue,
22
+ _transfer_to_host,
23
+ dpnp_available,
24
+ )
23
25
 
24
- try:
25
- from dpctl import SyclQueue
26
- from dpctl.memory import MemoryUSMDevice, as_usm_memory
27
- from dpctl.tensor import usm_ndarray
28
-
29
- dpctl_available = True
30
- except ImportError:
31
- dpctl_available = False
32
-
33
- try:
26
+ if dpnp_available:
34
27
  import dpnp
28
+ from onedal._device_offload import _convert_to_dpnp
35
29
 
36
- dpnp_available = True
37
- except ImportError:
38
- dpnp_available = False
39
30
 
40
31
  from ._config import get_config
41
- from ._utils import get_patch_message
42
-
43
- oneapi_is_available = "daal4py.oneapi" in sys.modules
44
- if oneapi_is_available:
45
- from daal4py.oneapi import _get_device_name_sycl_ctxt, _get_sycl_ctxt_params
46
-
47
-
48
- class DummySyclQueue:
49
- """This class is designed to act like dpctl.SyclQueue
50
- to allow device dispatching in scenarios when dpctl is not available"""
51
-
52
- class DummySyclDevice:
53
- def __init__(self, filter_string):
54
- self._filter_string = filter_string
55
- self.is_cpu = "cpu" in filter_string
56
- self.is_gpu = "gpu" in filter_string
57
- # TODO: check for possibility of fp64 support
58
- # on other devices in this dummy class
59
- self.has_aspect_fp64 = self.is_cpu
60
-
61
- if not (self.is_cpu):
62
- logging.warning(
63
- "Device support is limited. "
64
- "Please install dpctl for full experience"
65
- )
66
-
67
- def get_filter_string(self):
68
- return self._filter_string
69
-
70
- def __init__(self, filter_string):
71
- self.sycl_device = self.DummySyclDevice(filter_string)
72
-
73
-
74
- def _get_device_info_from_daal4py():
75
- if oneapi_is_available:
76
- return _get_device_name_sycl_ctxt(), _get_sycl_ctxt_params()
77
- return None, dict()
78
-
79
-
80
- def _get_global_queue():
81
- target = get_config()["target_offload"]
82
- d4p_target, _ = _get_device_info_from_daal4py()
83
- if d4p_target == "host":
84
- d4p_target = "cpu"
85
-
86
- QueueClass = DummySyclQueue if not dpctl_available else SyclQueue
87
-
88
- if target != "auto":
89
- if d4p_target is not None and d4p_target != target:
90
- if not isinstance(target, str):
91
- if d4p_target not in target.sycl_device.get_filter_string():
92
- raise RuntimeError(
93
- "Cannot use target offload option "
94
- "inside daal4py.oneapi.sycl_context"
95
- )
96
- else:
97
- raise RuntimeError(
98
- "Cannot use target offload option "
99
- "inside daal4py.oneapi.sycl_context"
100
- )
101
- if isinstance(target, QueueClass):
102
- return target
103
- return QueueClass(target)
104
- if d4p_target is not None:
105
- return QueueClass(d4p_target)
106
- return None
107
-
108
-
109
- def _transfer_to_host(queue, *data):
110
- has_usm_data, has_host_data = False, False
111
-
112
- host_data = []
113
- for item in data:
114
- usm_iface = getattr(item, "__sycl_usm_array_interface__", None)
115
- if usm_iface is not None:
116
- if not dpctl_available:
117
- raise RuntimeError(
118
- "dpctl need to be installed to work "
119
- "with __sycl_usm_array_interface__"
120
- )
121
- if queue is not None:
122
- if queue.sycl_device != usm_iface["syclobj"].sycl_device:
123
- raise RuntimeError(
124
- "Input data shall be located " "on single target device"
125
- )
126
- else:
127
- queue = usm_iface["syclobj"]
128
-
129
- buffer = as_usm_memory(item).copy_to_host()
130
- order = "C"
131
- if usm_iface["strides"] is not None:
132
- if usm_iface["strides"][0] < usm_iface["strides"][1]:
133
- order = "F"
134
- item = np.ndarray(
135
- shape=usm_iface["shape"],
136
- dtype=usm_iface["typestr"],
137
- buffer=buffer,
138
- order=order,
139
- )
140
- has_usm_data = True
141
- else:
142
- has_host_data = True
143
-
144
- mismatch_host_item = usm_iface is None and item is not None and has_usm_data
145
- mismatch_usm_item = usm_iface is not None and has_host_data
146
-
147
- if mismatch_host_item or mismatch_usm_item:
148
- raise RuntimeError("Input data shall be located on single target device")
149
-
150
- host_data.append(item)
151
- return queue, host_data
152
32
 
153
33
 
154
34
  def _get_backend(obj, queue, method_name, *data):
@@ -162,10 +42,7 @@ def _get_backend(obj, queue, method_name, *data):
162
42
  else:
163
43
  return "sklearn", None, patching_status
164
44
 
165
- _, d4p_options = _get_device_info_from_daal4py()
166
- allow_fallback_to_host = get_config()["allow_fallback_to_host"] or d4p_options.get(
167
- "host_offload_on_fail", False
168
- )
45
+ allow_fallback_to_host = get_config()["allow_fallback_to_host"]
169
46
 
170
47
  if gpu_device:
171
48
  patching_status = obj._onedal_gpu_supported(method_name, *data)
@@ -203,42 +80,6 @@ def dispatch(obj, method_name, branches, *args, **kwargs):
203
80
  )
204
81
 
205
82
 
206
- def _copy_to_usm(queue, array):
207
- if not dpctl_available:
208
- raise RuntimeError(
209
- "dpctl need to be installed to work " "with __sycl_usm_array_interface__"
210
- )
211
-
212
- if hasattr(array, "__array__"):
213
-
214
- try:
215
- mem = MemoryUSMDevice(array.nbytes, queue=queue)
216
- mem.copy_from_host(array.tobytes())
217
- return usm_ndarray(array.shape, array.dtype, buffer=mem)
218
- except ValueError as e:
219
- # ValueError will raise if device does not support the dtype
220
- # retry with float32 (needed for fp16 and fp64 support issues)
221
- # try again as float32, if it is a float32 just raise the error.
222
- if array.dtype == np.float32:
223
- raise e
224
- return _copy_to_usm(queue, array.astype(np.float32))
225
- else:
226
- if isinstance(array, Iterable):
227
- array = [_copy_to_usm(queue, i) for i in array]
228
- return array
229
-
230
-
231
- if dpnp_available:
232
-
233
- def _convert_to_dpnp(array):
234
- if isinstance(array, usm_ndarray):
235
- return dpnp.array(array, copy=False)
236
- elif isinstance(array, Iterable):
237
- for i in range(len(array)):
238
- array[i] = _convert_to_dpnp(array[i])
239
- return array
240
-
241
-
242
83
  def wrap_output_data(func):
243
84
  @wraps(func)
244
85
  def wrapper(self, *args, **kwargs):
@@ -14,4 +14,130 @@
14
14
  # limitations under the License.
15
15
  # ==============================================================================
16
16
 
17
- from onedal.basic_statistics import BasicStatistics
17
+ import numpy as np
18
+ from sklearn.base import BaseEstimator
19
+ from sklearn.utils import check_array
20
+ from sklearn.utils.validation import _check_sample_weight
21
+
22
+ from daal4py.sklearn._n_jobs_support import control_n_jobs
23
+ from daal4py.sklearn._utils import sklearn_check_version
24
+ from onedal.basic_statistics import BasicStatistics as onedal_BasicStatistics
25
+
26
+ from .._device_offload import dispatch
27
+ from .._utils import PatchingConditionsChain
28
+
29
+
30
+ @control_n_jobs(decorated_methods=["fit"])
31
+ class BasicStatistics(BaseEstimator):
32
+ """
33
+ Estimator for basic statistics.
34
+ Allows to compute basic statistics for provided data.
35
+ Parameters
36
+ ----------
37
+ result_options: string or list, default='all'
38
+ List of statistics to compute
39
+
40
+ Attributes (are existing only if corresponding result option exists)
41
+ ----------
42
+ min : ndarray of shape (n_features,)
43
+ Minimum of each feature over all samples.
44
+ max : ndarray of shape (n_features,)
45
+ Maximum of each feature over all samples.
46
+ sum : ndarray of shape (n_features,)
47
+ Sum of each feature over all samples.
48
+ mean : ndarray of shape (n_features,)
49
+ Mean of each feature over all samples.
50
+ variance : ndarray of shape (n_features,)
51
+ Variance of each feature over all samples.
52
+ variation : ndarray of shape (n_features,)
53
+ Variation of each feature over all samples.
54
+ sum_squares : ndarray of shape (n_features,)
55
+ Sum of squares for each feature over all samples.
56
+ standard_deviation : ndarray of shape (n_features,)
57
+ Standard deviation of each feature over all samples.
58
+ sum_squares_centered : ndarray of shape (n_features,)
59
+ Centered sum of squares for each feature over all samples.
60
+ second_order_raw_moment : ndarray of shape (n_features,)
61
+ Second order moment of each feature over all samples.
62
+ """
63
+
64
+ def __init__(self, result_options="all"):
65
+ self.options = result_options
66
+
67
+ _onedal_basic_statistics = staticmethod(onedal_BasicStatistics)
68
+
69
+ def _save_attributes(self):
70
+ assert hasattr(self, "_onedal_estimator")
71
+
72
+ if self.options == "all":
73
+ result_options = onedal_BasicStatistics.get_all_result_options()
74
+ else:
75
+ result_options = self.options
76
+
77
+ if isinstance(result_options, str):
78
+ setattr(self, result_options, getattr(self._onedal_estimator, result_options))
79
+ elif isinstance(result_options, list):
80
+ for option in result_options:
81
+ setattr(self, option, getattr(self._onedal_estimator, option))
82
+
83
+ def _onedal_supported(self, method_name, *data):
84
+ patching_status = PatchingConditionsChain(
85
+ f"sklearnex.basic_statistics.{self.__class__.__name__}.{method_name}"
86
+ )
87
+ return patching_status
88
+
89
+ _onedal_cpu_supported = _onedal_supported
90
+ _onedal_gpu_supported = _onedal_supported
91
+
92
+ def _onedal_fit(self, X, sample_weight=None, queue=None):
93
+ if sklearn_check_version("1.0"):
94
+ X = self._validate_data(X, dtype=[np.float64, np.float32], ensure_2d=False)
95
+ else:
96
+ X = check_array(X, dtype=[np.float64, np.float32])
97
+
98
+ if sample_weight is not None:
99
+ sample_weight = _check_sample_weight(sample_weight, X)
100
+
101
+ onedal_params = {
102
+ "result_options": self.options,
103
+ }
104
+
105
+ if not hasattr(self, "_onedal_estimator"):
106
+ self._onedal_estimator = self._onedal_basic_statistics(**onedal_params)
107
+ self._onedal_estimator.fit(X, sample_weight, queue)
108
+ self._save_attributes()
109
+
110
+ def compute(self, data, weights=None, queue=None):
111
+ return self._onedal_estimator.compute(data, weights, queue)
112
+
113
+ def fit(self, X, y=None, *, sample_weight=None):
114
+ """Compute statistics with X, using minibatches of size batch_size.
115
+
116
+ Parameters
117
+ ----------
118
+ X : array-like of shape (n_samples, n_features)
119
+ Data for compute, where `n_samples` is the number of samples and
120
+ `n_features` is the number of features.
121
+
122
+ y : Ignored
123
+ Not used, present for API consistency by convention.
124
+
125
+ sample_weight : array-like of shape (n_samples,), default=None
126
+ Weights for compute weighted statistics, where `n_samples` is the number of samples.
127
+
128
+ Returns
129
+ -------
130
+ self : object
131
+ Returns the instance itself.
132
+ """
133
+ dispatch(
134
+ self,
135
+ "fit",
136
+ {
137
+ "onedal": self.__class__._onedal_fit,
138
+ "sklearn": None,
139
+ },
140
+ X,
141
+ sample_weight,
142
+ )
143
+ return self