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

AdvanceSubtensor Error with JAX sampler #4431

Closed
muunetheus opened this issue Jan 22, 2021 · 6 comments
Closed

AdvanceSubtensor Error with JAX sampler #4431

muunetheus opened this issue Jan 22, 2021 · 6 comments
Labels
bug jax needs info Additional information required

Comments

@muunetheus
Copy link

When using JAX num_pyro NUTS sampler the following error is produced:

MissingInputError: Input 1 of the graph (indices start from 0), used to compute AdvancedSubtensor1(beta_mat ~ Deterministic, <TensorType(int32, vector)>), was not provided and not given a value. Use the Theano flag exception_verbosity='high', for more information on this error.

This error does not occur when using the standard sampler.

Tested with PYMC3 3.10.0 and 3.11.0.

@twiecki
Copy link
Member

twiecki commented Jan 22, 2021

Thanks! Can you post a minimal example to reproduce the error?

@MarcoGorelli MarcoGorelli added the needs info Additional information required label Jan 24, 2021
@muunetheus
Copy link
Author

Thanks! Can you post a minimal example to reproduce the error?

Working on getting generic/alternative code that will trigger the error. Unfortunately, I can't share the code that generated that error.

@muunetheus
Copy link
Author

muunetheus commented Feb 22, 2021

I managed to get JAX to compile and run by removing Theano shared variable. I read it from this discussion on discourse.

@twiecki Is this expected or an issues to be resolved?

@twiecki
Copy link
Member

twiecki commented Feb 22, 2021

@muunetheus Yes, shared variables are currently not supported in JAX, something we need to fix.

@brandonwillard
Copy link
Contributor

brandonwillard commented Feb 22, 2021

I think the only situation in which shared variables weren't working was random sampling, but the others should work.

We definitely need a MWE.

@brandonwillard
Copy link
Contributor

If the only remaining issue involves shared variables, then this issue is a duplicate of #4142.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug jax needs info Additional information required
Projects
None yet
Development

No branches or pull requests

4 participants