Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: adding array-api-compat and enabling array api conformance tests #2079

Merged
20 changes: 20 additions & 0 deletions deselected_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,26 @@
# will exclude deselection in versions 0.18.1, and 0.18.2 only.

deselected_tests:
# Array API support
# sklearnex functional Array API support doesn't guaranty namespace consistency for the estimator's array attributes.
- decomposition/tests/test_pca.py::test_pca_array_api_compliance[PCA(n_components=2,svd_solver='covariance_eigh')-check_array_api_input_and_values-array_api_strict-None-None]
- decomposition/tests/test_pca.py::test_pca_array_api_compliance[PCA(n_components=2,svd_solver='covariance_eigh',whiten=True)-check_array_api_input_and_values-array_api_strict-None-None]
- decomposition/tests/test_pca.py::test_pca_array_api_compliance[PCA(n_components=2,svd_solver='covariance_eigh')-check_array_api_get_precision-array_api_strict-None-None]
- decomposition/tests/test_pca.py::test_pca_array_api_compliance[PCA(n_components=2,svd_solver='covariance_eigh',whiten=True)-check_array_api_get_precision-array_api_strict-None-None]
- linear_model/tests/test_ridge.py::test_ridge_array_api_compliance[Ridge(solver='svd')-check_array_api_attributes-array_api_strict-None-None]
- linear_model/tests/test_ridge.py::test_ridge_array_api_compliance[Ridge(solver='svd')-check_array_api_input_and_values-array_api_strict-None-None]
# `train_test_split` inconsistency for Array API inputs.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be covered by ticket.

- model_selection/tests/test_split.py::test_array_api_train_test_split[True-None-array_api_strict-None-None]
- model_selection/tests/test_split.py::test_array_api_train_test_split[True-stratify1-array_api_strict-None-None]
- model_selection/tests/test_split.py::test_array_api_train_test_split[False-None-array_api_strict-None-None]
# PCA. Array API functionally supported for all factorizations. power_iteration_normalizer=["LU", "QR"]
- decomposition/tests/test_pca.py::test_array_api_error_and_warnings_on_unsupported_params
# PCA. InvalidParameterError: The 'M' parameter of randomized_svd must be an instance of 'numpy.ndarray' or a sparse matrix.
- decomposition/tests/test_pca.py::test_pca_array_api_compliance[PCA(n_components=2,power_iteration_normalizer='QR',random_state=0,svd_solver='randomized')-check_array_api_input_and_values-array_api_strict-None-None]
- decomposition/tests/test_pca.py::test_pca_array_api_compliance[PCA(n_components=2,power_iteration_normalizer='QR',random_state=0,svd_solver='randomized')-check_array_api_get_precision-array_api_strict-None-None]
# Ridge regression. Array API functionally supported for all solvers. Not raising error for non-svd solvers.
- linear_model/tests/test_ridge.py::test_array_api_error_and_warnings_for_solver_parameter[array_api_strict]

# 'kulsinski' distance was deprecated in scipy 1.11 but still marked as supported in scikit-learn < 1.3
- neighbors/tests/test_neighbors.py::test_kneighbors_brute_backend[float64-kulsinski] <1.3
- neighbors/tests/test_neighbors.py::test_radius_neighbors_brute_backend[kulsinski] <1.3
Expand Down
1 change: 1 addition & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ xgboost==2.1.1
lightgbm==4.5.0
catboost==1.2.7 ; python_version < '3.11' # TODO: Remove 3.11 condition when catboost supports numpy 2.0
shap==0.46.0
array-api-compat==1.8.0
array-api-strict==2.0.1
Loading