Skip to content

Commit 2d2483c

Browse files
Merge branch 'main' into dev/pytorch_testing_2
2 parents 7aff323 + d769d14 commit 2d2483c

File tree

12 files changed

+643
-1157
lines changed

12 files changed

+643
-1157
lines changed

.ci/pipeline/build-and-test-lnx.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ steps:
3737
conda activate CB
3838
if [ -z "${DALROOT}" ]; then conda install -q -y -c conda-forge "dal-devel>=2025.6.1"; fi
3939
pip install -r dependencies-dev
40-
pip list
40+
conda list
4141
env:
4242
DALROOT: ${{ variables.DALROOT }}
4343
displayName: "Install develop requirements"
@@ -62,7 +62,7 @@ steps:
6262
# dpep installation is set to pypi to avoid conflict of numpy versions from pip and conda
6363
if [ $(echo $(PYTHON_VERSION) | grep '3.9\|3.10\|3.11\|3.12') ] && [ $(SKLEARN_VERSION) != "1.0" ] && [ -z ${NO_DPC} ]; then pip install dpctl==$DPCTL_VERSION dpnp==$DPNP_VERSION; fi
6464
if [ -z "${NO_DPC}" ]; then pip install dpcpp-cpp-rt==$DPCPP_RT_VERSION; fi
65-
pip list
65+
conda list
6666
env:
6767
NO_DPC: ${{ variables.NO_DPC }}
6868
DPCTL_VERSION: 0.21.0

.ci/pipeline/build-and-test-mac.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ steps:
2929
- script: |
3030
source activate CB
3131
pip install -r dependencies-dev
32-
pip list
32+
conda list
3333
displayName: 'Install develop requirements'
3434
- script: |
3535
source activate CB
@@ -41,7 +41,7 @@ steps:
4141
bash .ci/scripts/setup_sklearn.sh $(SKLEARN_VERSION)
4242
pip install --upgrade -r requirements-test.txt
4343
pip install $(python .ci/scripts/get_compatible_scipy_version.py)
44-
pip list
44+
conda list
4545
displayName: 'Install testing requirements'
4646
- script: |
4747
source activate CB

.ci/pipeline/build-and-test-win.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ steps:
2525
pip install --upgrade setuptools
2626
pip install cpufeature
2727
pip install -r dependencies-dev
28-
pip list
2928
if not defined DALROOT conda install -q -y -c conda-forge "dal-devel>=2025.6.1"
29+
conda list
3030
displayName: 'Install develop requirements'
3131
env:
3232
DALROOT: ${{ variables.DALROOT }}
@@ -51,7 +51,7 @@ steps:
5151
cd ..
5252
for /f "delims=" %%c in ('python s\.ci\scripts\get_compatible_scipy_version.py') do set SCIPY_VERSION=%%c
5353
pip install %SCIPY_VERSION%
54-
pip list
54+
conda list
5555
displayName: 'Install testing requirements'
5656
- script: |
5757
call activate CB

.circleci/run_xpu_tests.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616
# ==============================================================================
1717

1818
# coding: utf-8
19-
import argparse
2019
import os
2120

21+
os.environ["SCIPY_ARRAY_API"] = "1"
22+
import argparse
23+
2224
import pytest
2325

2426
if __name__ == "__main__":
@@ -83,8 +85,6 @@
8385
if args.json_report_file is not None:
8486
pytest_params += ["--json-report", f"--json-report-file={args.json_report_file}"]
8587

86-
os.environ["SCIPY_ARRAY_API"] = "1"
87-
8888
if not args.no_intel_optimized:
8989
from sklearnex import patch_sklearn
9090

deselected_tests.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,9 @@ deselected_tests:
396396
- metrics/tests/test_common.py::test_array_api_compliance
397397
- utils/tests/test_stats.py::test_weighted_percentile_array_api_consistency
398398

399+
# Tests for exact equality, but results have differences in the order of machine epsilon
400+
- neighbors/tests/test_neighbors.py::test_KNeighborsClassifier_multioutput
401+
399402
# --------------------------------------------------------
400403
# No need to test daal4py patching
401404
reduced_tests:
@@ -525,12 +528,8 @@ gpu:
525528
- tests/test_common.py::test_estimators[ExtraTreesClassifier()-check_class_weight_classifiers]
526529
- tests/test_common.py::test_estimators[ExtraTreesRegressor()-check_sample_weights_invariance(kind=zeros)]
527530
- tests/test_common.py::test_estimators[RandomForestRegressor()-check_regressor_data_not_an_array]
528-
529-
# GPU implementation of Extra Trees doesn't support sample_weights
530-
# comparisons to GPU with sample weights will use different algorithms
531-
- tests/test_common.py::test_estimators[ExtraTreesClassifier()-check_sample_weights_invariance(kind=ones)]
532531
- tests/test_common.py::test_estimators[ExtraTreesClassifier()-check_sample_weights_invariance(kind=zeros)]
533-
- tests/test_common.py::test_estimators[ExtraTreesRegressor()-check_sample_weights_invariance(kind=ones)]
532+
- ensemble/tests/test_forest.py::test_min_weight_fraction_leaf
534533

535534
# RuntimeError: Device support is not implemented, failing as result of fallback to cpu false
536535
- svm/tests/test_svm.py::test_unfitted

doc/sources/array_api.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ The following patched classes have support for array API inputs:
9797
- :obj:`sklearn.covariance.EmpiricalCovariance`
9898
- :obj:`sklearnex.covariance.IncrementalEmpiricalCovariance`
9999
- :obj:`sklearn.decomposition.PCA`
100+
- :obj:`sklearn.ensemble.ExtraTreesClassifier`
101+
- :obj:`sklearn.ensemble.ExtraTreesRegressor`
102+
- :obj:`sklearn.ensemble.RandomForestClassifier`
103+
- :obj:`sklearn.ensemble.RandomForestRegressor`
100104
- :obj:`sklearn.linear_model.LinearRegression`
101105
- :obj:`sklearn.linear_model.Ridge`
102106
- :obj:`sklearnex.linear_model.IncrementalLinearRegression`
@@ -108,6 +112,11 @@ The following patched classes have support for array API inputs:
108112
enabled in |sklearn|, when passing these classes as inputs, data will be transferred to host and then back to
109113
device instead of being used directly.
110114

115+
Result attributes of |sklearnex| classes which contain |sklearn| or |sklearnex| classes may not themselves be
116+
array API compliant. For example, ensemble algorithms contain decision tree estimators result objects which
117+
do not comply with the array API standard.
118+
119+
111120

112121
Example usage
113122
=============

0 commit comments

Comments
 (0)