Skip to content

[KMeans] Rename streaming_batch_size param - #2328

Merged
rapids-bot[bot] merged 8 commits into
NVIDIA:release/26.08from
tarang-jain:rename-params
Jul 23, 2026
Merged

[KMeans] Rename streaming_batch_size param#2328
rapids-bot[bot] merged 8 commits into
NVIDIA:release/26.08from
tarang-jain:rename-params

Conversation

@tarang-jain

@tarang-jain tarang-jain commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

This PR renames the streaming_batch_size param for kmeans to:

  1. Better convey the meaning of the param -- link to discussion: Exposing opt-in double buffering for MG batched KMeans #2323 (comment)
  2. Avoid confusion with the already existing batch_samples and batch_centroids params

The idea is that the streaming word can be misleading. We are "buffering up" a batch of samples onto the device.

Merge after #2329

@tarang-jain tarang-jain self-assigned this Jul 20, 2026
@tarang-jain tarang-jain added breaking Introduces a breaking change improvement Improves an existing functionality labels Jul 20, 2026
@copy-pr-bot

copy-pr-bot Bot commented Jul 20, 2026

Copy link
Copy Markdown

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.

@tarang-jain
tarang-jain changed the base branch from main to release/26.08 July 20, 2026 17:32
@tarang-jain
tarang-jain marked this pull request as ready for review July 20, 2026 17:46
@tarang-jain
tarang-jain requested review from a team as code owners July 20, 2026 17:46
@tarang-jain
tarang-jain requested a review from a team as a code owner July 20, 2026 19:06
@tarang-jain
tarang-jain requested a review from bdice July 20, 2026 19:06
@tarang-jain
tarang-jain removed request for a team and bdice July 21, 2026 03:08

@jinsolp jinsolp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we call it n_device_buffer_samples to make it obvious that it's the number of samples?

Comment thread cpp/include/cuvs/cluster/kmeans.hpp Outdated
@tarang-jain

Copy link
Copy Markdown
Contributor Author

Can we call it n_device_buffer_samples to make it obvious that it's the number of samples?

I think @jinsolp lets not make param names even longer. device_buffer_samples is already pretty informative.

@tarang-jain

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit ab79f9a into NVIDIA:release/26.08 Jul 23, 2026
163 of 165 checks passed
rapids-bot Bot pushed a commit to rapidsai/cuml that referenced this pull request Jul 27, 2026
Adds `device_buffer_samples` to single-GPU KMeans for host-resident input data.

For host-resident inputs, positive values select host-streamed fitting, avoiding an up-front full-device copy of `X`. Device-resident inputs continue to use the standard device path and ignore `device_buffer_samples`. The PR wires `device_buffer_samples` and `init_size` through C++ and Python, rejects positive `device_buffer_samples` values for multi-GPU use, computes labels and inertia in chunks for the host path, and adds weighted and unweighted parity tests against the existing device path.

Depends on NVIDIA/cuvs#2328 (merged).

Follow-up: NVIDIA/cuvs#2359

Closes #8202

Authors:
  - Tarang Jain (https://github.com/tarang-jain)

Approvers:
  - Victor Lafargue (https://github.com/viclafargue)
  - Jim Crist-Harif (https://github.com/jcrist)
  - Simon Adorf (https://github.com/csadorf)

URL: #8248
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Introduces a breaking change improvement Improves an existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants