Merged
Conversation
Contributor
Author
|
/intelci: run |
Contributor
Author
|
/intelci: run |
david-cortes-intel
approved these changes
Apr 1, 2026
Contributor
david-cortes-intel
left a comment
There was a problem hiding this comment.
LGTM, pending CI results.
| hasattr(r, "__sycl_usm_array_interface__") for r in result | ||
| ): | ||
| return result | ||
| if usm_iface := getattr(data, "__sycl_usm_array_interface__", None): |
Contributor
|
/intelci: run |
Contributor
|
/azp run Nightly |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
|
/intelci: run |
Contributor
|
/azp run Nightly |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/intelci: run |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the deprecated use_raw_input configuration path and updates estimators/tests to always validate inputs rather than bypassing validation via raw inputs.
Changes:
- Remove
use_raw_inputfromsklearnex/onedalconfiguration and offload logic. - Update many estimators to always call
validate_data(and adjust classification target processing accordingly). - Simplify/adjust SPMD test parametrization by removing
use_raw_inputcoverage and relatedconfig_contextusage.
Reviewed changes
Copilot reviewed 34 out of 34 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| sklearnex/spmd/neighbors/tests/test_neighbors_spmd.py | Drops use_raw_input parametrization; keeps array_api_dispatch coverage. |
| sklearnex/spmd/neighbors/neighbors.py | Removes stale comment tied to use_raw_input behavior. |
| sklearnex/spmd/linear_model/tests/test_logistic_regression_spmd.py | Removes use_raw_input test path and related config_context usage. |
| sklearnex/spmd/linear_model/tests/test_linear_regression_spmd.py | Removes use_raw_input test path and related config_context usage. |
| sklearnex/spmd/linear_model/tests/test_incremental_linear_spmd.py | Removes use_raw_input parametrization and context usage. |
| sklearnex/spmd/ensemble/tests/test_forest_spmd.py | Removes use_raw_input parametrization and context usage. |
| sklearnex/spmd/decomposition/tests/test_pca_spmd.py | Removes use_raw_input parametrization and context usage. |
| sklearnex/spmd/decomposition/tests/test_incremental_pca_spmd.py | Removes use_raw_input parametrization and context usage. |
| sklearnex/spmd/covariance/tests/test_incremental_covariance_spmd.py | Removes use_raw_input parametrization and context usage. |
| sklearnex/spmd/covariance/tests/test_covariance_spmd.py | Removes use_raw_input parametrization and context usage. |
| sklearnex/spmd/cluster/tests/test_kmeans_spmd.py | Removes use_raw_input parametrization and context usage. |
| sklearnex/spmd/cluster/tests/test_dbscan_spmd.py | Removes use_raw_input parametrization and context usage. |
| sklearnex/spmd/basic_statistics/tests/test_incremental_basic_statistics_spmd.py | Removes use_raw_input parametrization and context usage. |
| sklearnex/spmd/basic_statistics/tests/test_basic_statistics_spmd.py | Removes use_raw_input parametrization and context usage. |
| sklearnex/preview/decomposition/incremental_pca.py | Removes use_raw_input branching; always validates inputs. |
| sklearnex/preview/covariance/covariance.py | Removes use_raw_input branching; always validates inputs/covariance. |
| sklearnex/neighbors/knn_unsupervised.py | Removes use_raw_input branching; always validates inputs. |
| sklearnex/neighbors/knn_regression.py | Removes use_raw_input branching; always validates inputs in fit/predict/kneighbors. |
| sklearnex/neighbors/knn_classification.py | Removes use_raw_input branching; always validates inputs; forces target validation. |
| sklearnex/neighbors/common.py | Updates docstring to remove use_raw_input reference. |
| sklearnex/linear_model/logistic_regression.py | Removes use_raw_input gating around validation. |
| sklearnex/linear_model/linear.py | Removes use_raw_input gating around validation. |
| sklearnex/linear_model/incremental_linear.py | Removes use_raw_input gating; always validates when check_input is True. |
| sklearnex/ensemble/_forest.py | Removes use_raw_input branching; standardizes validation/class_weight handling. |
| sklearnex/decomposition/pca.py | Removes use_raw_input gating around validation. |
| sklearnex/covariance/incremental_covariance.py | Removes use_raw_input gating around validation. |
| sklearnex/cluster/k_means.py | Removes use_raw_input gating around validation. |
| sklearnex/cluster/dbscan.py | Removes use_raw_input gating; always validates inputs and sample_weight. |
| sklearnex/basic_statistics/incremental_basic_statistics.py | Removes use_raw_input gating; always validates when check_input is True. |
| sklearnex/basic_statistics/basic_statistics.py | Removes use_raw_input gating; always validates inputs/sample_weight. |
| sklearnex/_device_offload.py | Removes use_raw_input dispatch path; adjusts output conversion behavior for USM inputs. |
| sklearnex/_config.py | Removes use_raw_input from public config API and docstrings. |
| onedal/_device_offload.py | Removes use_raw_input queue/override logic and logging hooks. |
| onedal/_config.py | Removes use_raw_input from default onedal config. |
Comments suppressed due to low confidence (1)
sklearnex/_device_offload.py:220
- In wrap_output_data(), the new unconditional conversion path for USM inputs will also run when
resultis already a SYCL/USM object (including tuple/list of USM arrays, e.g.kneighborsreturning(dist, ind)). Becausecopy_to_dpnp/copy_to_usmconverts iterables to a Python list, this can change the public return type from tuple to list and can also force an unnecessary device->host->device copy when outputs are already on the correct device. Consider restoring the prior guard to returnresultas-is when it (or all elements of a tuple/list) already expose__sycl_usm_array_interface__, and/or preserve the original container type when converting iterables.
if usm_iface := getattr(data, "__sycl_usm_array_interface__", None):
queue = usm_iface["syclobj"]
return copy_to_dpnp(queue, result)
if get_config().get("transform_output") in ("default", None):
if hasattr(data, "dtype"):
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Checklist:
Completeness and readability
Testing
Performance