Skip to content

[DO NOT MERGE] Tracking scikit-learn failure fixes #6451

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

Draft
wants to merge 22 commits into
base: branch-25.04
Choose a base branch
from

Conversation

csadorf
Copy link
Contributor

@csadorf csadorf commented Mar 17, 2025

No description provided.

wphicks and others added 19 commits January 23, 2025 14:15
This update introduces a new function, `support_array_like`, to handle conversion of list and tuple inputs to NumPy arrays when the accelerator is active. Additionally, the `CumlArray` class has been modified to support this conversion during initialization, ensuring compatibility with array-like data types.

Changes include:
- New `support_array_like` function in `api_decorators.py`.
- Updated `CumlArray` to convert list/tuple inputs to NumPy arrays when the accelerator is active.
- Detect lists and tuples as array-like in `input_utils.py` in accel
  mode.
This commit introduces a new test file, `test_array_like_input.py`, which includes tests for the `support_array_like` function and the `CumlArray` class. The tests validate the conversion of list and tuple inputs to NumPy arrays, as well as the handling of NumPy and CuPy arrays when the accelerator is active.
- Introduced a new method in KMeans to dispatch CPU implementation when sparse arrays are detected during fitting.
- Updated the is_sparse function to use cupyx' and scipy's issparse method for better compatibility.
- Introduced a new test to verify that KMeans correctly dispatches to CPU when fitting with sparse input.
- Ensured that the model's attributes and predictions are validated as numpy arrays when using sparse data.
- Changed default solver from 'eig' to 'auto', allowing automatic selection of 'eig'.
- Updated documentation to reflect new solver options: 'auto', 'eig', 'svd', and 'cd'.
- Refactored solver selection logic into a new method `_select_solver` for better clarity and maintainability.
- Check for non-scalar intercept values and ensuring correct coefficient
  array shapes for matrix multiplication.
- Dispatch Ridge to CPU for multi-target training.
…o do-not-push/all-scikit-learn-test-failure-related-changes
…ot-push/all-scikit-learn-test-failure-related-changes
@csadorf csadorf added bug Something isn't working DO NOT MERGE Hold off on merging; see PR for details non-breaking Non-breaking change labels Mar 17, 2025
@csadorf csadorf self-assigned this Mar 17, 2025
Copy link

copy-pr-bot bot commented Mar 17, 2025

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions bot added the Cython / Python Cython or Python issue label Mar 17, 2025
csadorf added 3 commits March 17, 2025 15:53
Updated the args_to_cpu method to allow NoneType as a valid argument alongside numbers and strings.

Fixes skl tests:
- test_inplace_data_preprocessing[42-False-csr_matrix]
- test_linear_regression_sample_weight_consistency[42-False-csr_matrix]
Updated the input_to_cuml_array function to convert scalar values into arrays of appropriate shape. This enhancement improves the function's flexibility in handling different input types.

Fixes skl tests:
- test_linear_regression_sample_weight_consistency[42-False-None
- test_linear_regression_sample_weight_consistency[42-True-None]
Updated the Ridge class to include a check for wide datasets (n_features > n_samples) when using the SVD solver. This addition improves the decision-making process for dispatching to the CPU implementation during fit-related functions, ensuring better performance for specific data shapes.

Fixes skl tests:
- test_ridge_sample_weight_consistency[42-svd-wide-None-False]
- test_ridge_sample_weight_consistency[42-svd-wide-None-True]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Cython / Python Cython or Python issue DO NOT MERGE Hold off on merging; see PR for details non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants