-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Most recent commit breaks CmdStanR models with 1 chain #386
Comments
I believe this is the source of the error in stan-dev/cmdstanr#1050. It took me a while (longer than it should have!) to notice that the example from @tillahoffmann was using the latest commit of posterior. |
@tillahoffmann also confirmed in stan-dev/cmdstanr#1050 (comment) that he can replicate this posterior behavior, so I'm pretty sure this is the issue causing the errors in CmdStanR. |
Another instance of a user running into this: https://discourse.mc-stan.org/t/error-in-dim-x-c-dim-x-1/37661 |
Thank you for finding this error. I am sorry I didn't respond earlier. I didn't get email notifications from github. Do you have a suggestion for how to fix this without having to revert to the commit? I would like to keep this feature if we can make it work safely with cmdStanR |
For now @paul-buerkner and I decided to revert the commit, and we will add this feature back in without breaking CmdStanR. In order to do that it might be sufficient to just avoid applying this to lists of data frames, but will have to double check if that's enough. |
Closing now that #387 is merged |
@paul-buerkner I think this commit 79d4521 is causing problems for CmdStanR models with 1 chain. The reason is that with that commit a list of a single data frame now gets passed to
posterior::: as_array_matrix_list
becauseis_matrix_list_like
is TRUE. This results in an error because of these lines inas_array_matrix_list
:posterior/R/as_draws_array.R
Lines 232 to 234 in 79d4521
If the list has two data frames there's no error, which is why it only affects runs of a single chain.
This can be demonstrated without CmdStanR with a toy example. Here I first check the CRAN version (no error), then the latest posterior on GitHub (error), then install from posterior on GitHub from the commit before the latest commit (no error):
When a CmdStanR model has a single chain this error happens when
as_draws_array()
is called on the list of a single data frame that is created when reading in the single CSV file.The text was updated successfully, but these errors were encountered: