-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Error when running loo with moment_match = TRUE on rstan model from previous session #183
Comments
Hi, This also means that moment matching can't be used on the results of cmdstan. ETA: |
We are aware of this issue and it is a general problem with rstan that is not directly related to the loo package. There are certain methods that rstan uses for moment matching that don’t work after reloading a model in a new session. Unfortunately there are no straightforward workarounds at the moment, so moment matching for rstan fits needs to be done in the same R session as sampling. |
Hi,
I'm trying to run loo with moment matching on an rstan model fit in a previous session. The stanfit object was saved using:
And then loaded and loo (from https://github.com/stan-dev/rstan/blob/develop/rstan/rstan/R/loo.R) was run with:
which throws the following error:
Fitting and loading are both happening on the same system (university HPC cluster). I have no problems loading the stanfit object and then running other functions on this system (running
extract(fit)
for example) or loading the stanfit object on my local system (Mac OS 11.2.1). This also works fine if the model is fit and then loo is run within the same session (i.e. not from a .rds file).HPC Cluster specs:
R environment specs:
Thanks for your help and developing such an awesome package! If this is an
rstan
and not aloo
problem I'm happy to move the issue there.The text was updated successfully, but these errors were encountered: