errors in examples/time_series/bayesian_var_model.ipynb
#768
Labels
hackathon
Suitable for hackathon project
examples/time_series/bayesian_var_model.ipynb
#768
errors in examples/time_series/bayesian_var_model.ipynb
Error in bayesian_var_model.ipynb:
Notebook url: https://github.com/pymc-devs/pymc-examples/tree/main/examples/time_series/bayesian_var_model.ipynb
Issue description
Error in imports: replace
from pymc.sampling_jax import sample_blackjax_nuts
withfrom pymc.sampling.jax import sample_blackjax_nuts
Error on creating betaX in make_model and make_hierarchical_model:
Proposed solution
Adding another dimension to broken piece of code (namely "equations") solves the problem:
Another issue
This error, AFAIC, is purely Windows-related (see here). In function
make_hierarchical_model
this line breaks:idata.extend(sample_blackjax_nuts(2000, random_seed=120))
. Same error withsample_numpyro_nuts
.First error is
RuntimeError: Incorrect output dtype for return value #0: Expected: int64, Actual: int32
. It's being fixed as in this issue.But then another error shows:
and I have no idea how to solve it.
Possible solution
The workaround (if it is not an issue for Linux systems) is to use simple
pm.sample
instead ofsample_blackjax_nuts
if code is running on Windows (can be checked withif os.name == 'nt'
for example).This behavior was also fixed in numpy 2.0 (link to release notes), so this solution may be temporary.
The text was updated successfully, but these errors were encountered: