Description
Description of your problem
I noticed that when I want to use pm.set_data()
, if my model has a pm.Deterministic
transformation that gets passed into the likelihood, I will get shape issues.
Without the use of pm.Deterministic
in my model, the shapes of posterior predictive samples, when I pass in new data of length 1, are of shape (chain, draw, 1)
.
With the use of pm.Deterministic
in my model, the shapes of posterior predictive samples, when I pass in new data, are of shape (chain, draw, n)
, where n
== "length of data that I used to fit the model".
I believe this is a bug with pm.Deterministic
s interacting with pm.set_data
, but I'm not quite sure how to pinpoint the problem.
Please provide a minimal, self-contained, and reproducible example.
I found it much easier to provide a reprex as a Jupyter notebook available here: https://gist.github.com/ericmjl/e82b40805805d9feeaff9f39182ff32c
Please provide the full traceback.
No traceback necessary.
Please provide any additional information below.
Versions and main components
- PyMC/PyMC3 Version: 4.0.0b1
- Aesara/Theano Version: 2.3.2
- Python Version: 3.9.9
- Operating system: Ubuntu Linux
- How did you install PyMC/PyMC3: conda