-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
bambi dev version with bayeux give wrong posterior dims for hierarchical model (mixed and dropped dimensions) #800
Comments
This is happening because For example, see the first model you shared, it makes uses of deterministics. |
I guess getting the suggestion here: jax-ml/bayeux#21 (comment) implemented would fix this? I'm hopeful to have some bandwidth this week -- I'll add details to the linked issues in case someone else wants to make a PR though. (the details will be to copy what PyMC does, and open issues with PyMC to make this a public API so it is somewhat stable) |
Right now, I'm testing an implementation with |
@danieltomasz can you install from the branch in this PR? #803 Your models should run |
@tomicapretto when I try to run the code
I got
My test env has I installed it via conda (I had problem with pytensor on M1 installed via pip)
(edit: first time when I tried to install bambi from this branch I got bad version, second time is 0.13) |
Sorry, for some reason conda ignored pip install, I will install the version from branch directly in jupyter and check |
The result of it was really unexpected to see this version but also installing from latest commit yield the same version I am still getting |
The reason was that |
Also when i set |
@danieltomasz The version name is automatically generated. This is done on purpose. If we have As for the r-hat stats, are you using the same random seed? It may be just bad luck. We have not changed the implementation. |
Hi @tomicapretto thanks for the reply! Yes, I kind of figured out that this version is a some special way of marking, that way I deleted my previous comment before reading your reply; The motivation for my remark was more about better error message - the code worked with previous versions of Bambi (including 0.13) without bayeux-ml in virtual test environment, for someone who updates from older version it might be not super clear that bayes-ml should be installed ; I run Mac with M1 and only pytensor version from conda-forge works without errors, with conda cannot install bambi[jax],so I need to add optional dependcies manually with the more specific error message saying I should install bayeux-ml in case I was trying to use old numpyro-nuts and it's not installed , I would get clue faster (or reminded myself what I learned before setting env to test bambi) |
@danieltomasz thanks for the suggestion, I really appreciate it. We're still preparing ourselves for a 0.14.0 release and I think before that we need to make sure users receive an informative message when they try to use a JAX-based sampler. |
the bambi 0.13 (in python 3.11) gives expected results, but not git version (arviz 0.18 in both env)
The git version actually doesnt return hierarchical model
Data variables
1|subject ~ (chain, draw, subject__factor_dim)
1|ROI ~ (chain, draw, ROI__factor_dim)
are dropped
and the subject factor and ROI factor have mixed dims (when you compare it looking to
print(df.nunique())
Dimensions: chain: 8draw: 1000subject__factor_dim: 21ROI__factor_dim: 124
while the
0.13
another example will not even be able to return the posterior
Will give following error
the problem was discussed earlier here #799
The text was updated successfully, but these errors were encountered: