-
Notifications
You must be signed in to change notification settings - Fork 22
Add random_state class #1139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add random_state class #1139
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we need to support the following use case:
rs = dpnp.random.RandomState(seed=1, sycl_queue=dpctl.SyclQueue())
rs.uniform(lower=0., upper=1, size=10, usm_type='device')
Perhaps we also need to provide parameter device
for RandomState
.
@Alexander-Makaryev what do you think about extra parameter?
dpnp/random/dpnp_iface_random.py
Outdated
|
||
|
||
seed = 1 | ||
default_random_state = RandomState(seed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rename it to dpnp_random_state
if patched the PR.
Building in CI is failed. |
… MKL relating things into source file)
…ndom.seed() calls
252fd94
to
f7bc0b3
Compare
77d1c87
to
84d224d
Compare
84d224d
to
a697ab7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is big improvement over previous state.
Existing minor issues will be addressed in subsequent RPs.
Thanks @antonwolfy for finishing this work.
Uh oh!
There was an error while loading. Please reload this page.