Skip to content

Plans for support of a random number generation API? #671

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

Closed
adonath opened this issue Aug 3, 2023 · 4 comments
Closed

Plans for support of a random number generation API? #671

adonath opened this issue Aug 3, 2023 · 4 comments
Labels
Question General question.

Comments

@adonath
Copy link

adonath commented Aug 3, 2023

Many of the the libraries such as numpy, torch, jax etc. have support for random number generation. Typically in their own namespace, or exposed via a Generator API. Are there any plans to extend the API standard for random number generation using arrays? I am aware this poses a lot of challenges in terms of reproducibility across multiple implementations, but maybe this has been discussed in the past already and has been discarded for not being in scope?

@honno
Copy link
Member

honno commented Aug 3, 2023

See #431 for some interesting convo on the subject. We concluded with

Given lack of ecosystem agreement, we are not likely to forge a path forward for standardizing a PRNG API in the array API specification at this time. [...] We can reopen/revisit if and when we have greater community consensus.

I'll close this issue, but please do feel free to continue the conversation on #431.

@honno honno closed this as completed Aug 3, 2023
@rgommers
Copy link
Member

rgommers commented Aug 3, 2023

I'd add that we will probably try to build an implementation soon for SciPy's usage (since we need it in quite a few places) that exposes a uniform API and works with NumPy, PyTorch, CuPy and JAX at least.

@rgommers rgommers added the Question General question. label Aug 3, 2023
@adonath
Copy link
Author

adonath commented Aug 3, 2023

Great thanks, @rgommers and @honno!

@NeilGirdhar
Copy link

Is there any update on random number generation available somewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question General question.
Projects
None yet
Development

No branches or pull requests

4 participants