Skip to content

Error nicely in KMeans if n_samples < n_clusters#7189

Merged
rapids-bot[bot] merged 3 commits intorapidsai:branch-25.10from
jcrist:error-kmeans-n-samples-too-small
Sep 9, 2025
Merged

Error nicely in KMeans if n_samples < n_clusters#7189
rapids-bot[bot] merged 3 commits intorapidsai:branch-25.10from
jcrist:error-kmeans-n-samples-too-small

Conversation

@jcrist
Copy link
Copy Markdown
Member

@jcrist jcrist commented Sep 8, 2025

This mirrors the sklearn error and prevents a CUDA error from bubbling up.

Fixes #7185.

This mirrors the sklearn error and prevents a CUDA error from bubbling
up.
@jcrist jcrist self-assigned this Sep 8, 2025
@jcrist jcrist requested a review from a team as a code owner September 8, 2025 15:53
@jcrist jcrist requested a review from viclafargue September 8, 2025 15:53
@jcrist jcrist added bug Something isn't working Cython / Python Cython or Python issue non-breaking Non-breaking change labels Sep 8, 2025
@jcrist
Copy link
Copy Markdown
Member Author

jcrist commented Sep 9, 2025

/merge

@rapids-bot rapids-bot Bot merged commit ffae0d8 into rapidsai:branch-25.10 Sep 9, 2025
101 checks passed
@jcrist jcrist deleted the error-kmeans-n-samples-too-small branch September 9, 2025 01:58
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 non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] cuml.cluster.KMeans.fit crashes with cudaErrorIllegalAddress when n_samples < n_clusters

3 participants