Skip to content

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

Description

@trivialfis

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

Activity

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions