rapidsai/cuml
[BUG] `make_regression` is not deterministic with `shuffle=True`.
Ouverte
#7 871 ouverte le 7 mars 2026
buggood first issue
Métriques du dépôt
- Stars
- (5 223 étoiles)
- Métriques de merge PR
- (Aucune PR mergée en 30 j)
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