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

Consider using numpyro.contrib.control_flow.scan over jax.lax.scan #213

Closed
damonbayer opened this issue Jun 25, 2024 · 3 comments
Closed
Labels
pyrenew related to pyrenew internals request New feature or request

Comments

@damonbayer
Copy link
Collaborator

Our use of jax.lax.scan has been fine so far, but the built-in numpyro.contrib.control_flow.scan offers additional features/compatibility with numpyro.

@damonbayer damonbayer added request New feature or request pyrenew related to pyrenew internals and removed development task labels Jul 12, 2024
@dylanhmorris
Copy link
Collaborator

We have now mostly moved to this, but with the caveats to be explored in #444

@sbidari
Copy link
Collaborator

sbidari commented Sep 13, 2024

We use jax.lax.scan in the Infection classes, should these be switched to numpyro.contrib.control_flow.scan?

latest, all_infections = jax.lax.scan(f=incidence_func, init=I0, xs=Rt)

latest, infs_and_R_adj = jax.lax.scan(

@dylanhmorris
Copy link
Collaborator

I think for deterministic scans we should probably stick with jax.lax.scan but let's discuss in #444

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pyrenew related to pyrenew internals request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants