rapidsai/cuml

[BUG] `make_regression` is not deterministic with `shuffle=True`.

Open

#7,871 opened on Mar 7, 2026

View on GitHub
 (3 comments) (0 reactions) (1 assignee)Python (644 forks)auto 404
buggood first issue

Repository metrics

Stars
 (5,223 stars)
PR merge metrics
 (PR metrics pending)

Description

Describe the bug As in the title. Running it multiple times with the same seed generates different results.

Steps/Code to reproduce bug

from cuml.datasets import make_regression
import cupy as cp

X1, y1 = make_regression(
    n_samples=100, n_features=5, n_informative=5, random_state=42
)
X2, y2 = make_regression(
    n_samples=100, n_features=5, n_informative=5, random_state=42
)

assert cp.array_equal(X1, X2)
assert cp.array_equal(y1, y2)

Additional context Add any other context about the problem here.

It seems rand() is used by raft: https://github.com/rapidsai/raft/blob/bf258f39b670d65c60d8a681c8ec45d0ade5690f/cpp/include/raft/random/detail/permute.cuh#L126

Contributor guide