[FEA] Return centers generated by raft::random::make_blobs
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 53/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- machine-learning
Research direction
Read cpp/include/raft/random/detail/make_blobs.cuh, especially the make_blobs_caller implementation linked in the issue. Trace how the temporary centers are created and how the public API calls into it, then identify the relevant make_blobs tests. Done means an optional output exposes the exact generated centers while preserving samples, labels, and RNG behavior; verify with the same-seed and zero-standard-deviation comparisons described in the issue.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
When centers == nullptr, make_blobs_caller creates centers in a temporary rand_centers buffer and discards them after generating the samples. A caller that wants to return the generated centers cannot retrieve the exact centers used for that dataset. This blocks cuml.datasets.make_blobs(..., return_centers=True) from using the same RAFT generation path as return_centers=False without changing the samples and labels for a fixed seed. See the current implementation and cuML #8482.
Describe the solution you'd like
Provide an optional output for generated centers, while keeping the existing API usable. When requested, RAFT should return the centers it used for the samples, without changing sample generation, labels, or RNG behavior. A regression test should call make_blobs twice with the same seed, once requesting centers and once not, and compare the samples and labels exactly. With zero standard deviation, each sample should equal the returned center for its label.
Describe alternatives you've considered
cuML can generate centers separately and pass them as input, but that follows a different RNG path and changes the dataset when return_centers is toggled. Keeping a second CuPy generator is also possible, but the cuML review prefers resolving this in RAFT before switching backends.
- Dominant language
- Cuda
- Stars
- 1.1k
- Forks
- 260
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 21
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NVIDIA/raft
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
[BUG] Half-precision gemm fails with CUBLAS_STATUS_NOT_SUPPORTED when A or B is not 16-byte alignedOpenbug
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
[BUG] A column with one infinity sums to NaN in `raft::stats::sum`Possibly taken @galleonli claimed this 4 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 58/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
easystats/performance#1038 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
NVIDIA/physicsnemo#2354 ·
Maintainers usually reply within 2 days
-
ai-generated tests
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
data good first issue
Difficulty 1/5 Under an hour Newbie friendliness 92/100