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

from_pymc3_predictions does not support arviz trace input #1283

Closed
kyleabeauchamp opened this issue Jul 7, 2020 · 2 comments
Closed

from_pymc3_predictions does not support arviz trace input #1283

kyleabeauchamp opened this issue Jul 7, 2020 · 2 comments

Comments

@kyleabeauchamp
Copy link
Contributor

az.from_pymc3_predictions(predictions=ppc, posterior_trace=tr, model=model)                                                                                                                                                                                 

[...]/lib/python3.7/site-packages/arviz/data/io_pymc3.py in __init__(self, trace, prior, posterior_predictive, log_likelihood, predictions, coords, dims, model, save_warmup)
     99                 ].model
    100             self.nchains = trace.nchains if hasattr(trace, "nchains") else 1
--> 101             if hasattr(trace.report, "n_draws") and trace.report.n_draws is not None:
    102                 self.ndraws = trace.report.n_draws
    103                 self.attrs = {


AttributeError: 'InferenceData' object has no attribute 'report'

FWIW, I've also tried passing along the tr.posterior object rather than the full InferenceData object, but AFAIK the issue is that all from_pymc3_predictions code paths expect a pymc3 object, rather than an arviz trace.

@kyleabeauchamp
Copy link
Contributor Author

Out[7]: '3.9.2'

In [8]: az.__version__                                                                                                                                                                                                                                                        
Out[8]: '0.9.0'

@kyleabeauchamp
Copy link
Contributor Author

Actually, the idata_orig arg might do this, but I'm hitting an issue with dimensions, which I think is due to something I reported over in pymc3 (`ValueError: conflicting sizes for dimension) pymc-devs/pymc#4004

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