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

Fix faulty interaction between jax.vmap and validate_args=True #1686

Merged
merged 2 commits into from
Nov 25, 2023

Conversation

pierreglaser
Copy link
Contributor

Closes #1684

@fehiepsi I changed the reproducer to a pattern that felt more prone to happen in practice than #1684 (comment):

    v_dist = jax.vmap(
        lambda loc, scale: dist.Normal(loc=loc, scale=scale, validate_args=True),
        in_axes=(0, 0),
    )(jnp.zeros((2,)), jnp.zeros((2,)))

@fehiepsi
Copy link
Member

Nice fix! Thanks, @pierreglaser!

@fehiepsi fehiepsi merged commit 31c175b into pyro-ppl:master Nov 25, 2023
4 checks passed
OlaRonning pushed a commit to aleatory-science/numpyro that referenced this pull request May 6, 2024
…yro-ppl#1686)

* add initial bug reproducer

* disable arg validation during `tree_unflatten`
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

Successfully merging this pull request may close these issues.

How to use vmap in the context of a model?
2 participants