Skip to content
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

Efficiency improvement in rng_fn() #131

Open
vandalt opened this issue Jun 28, 2024 · 0 comments
Open

Efficiency improvement in rng_fn() #131

vandalt opened this issue Jun 28, 2024 · 0 comments

Comments

@vandalt
Copy link
Contributor

vandalt commented Jun 28, 2024

A PyMC developer pointed out potential inefficiencies in rng_fn() for CeleriteNormalRV.

Here is the relevant text from the original comment:

Also there's some inefficiency in your rng_fn. If size is provided (size is not None), you shouldn't have to broadcast the params together, it's enough to have your call below where you broadcast each param to size (there you are also hardcoding implicitly the ndims_params when you do param.shape[-n:] btw).

Only when size is not provided do you need to broadcast the params, as size is implicitly the broadcasted batch shape of all the parameters.

I don't have time to look into this now, but wanted to point it out in case someone wanted to look into it.

Thank you!

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

No branches or pull requests

1 participant