Error when running loo with moment_match = TRUE on rstan model from previous session
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
Comienza con el punto de entrada loo(fit, moment_match = TRUE) y la implementación en rstan/R/loo.R enlazada en el informe. Reproduce el fallo guardando y volviendo a cargar un stanfit antes de llamar a loo, y compáralo con una llamada realizada en la misma sesión. Se considera completado cuando el modelo vuelto a cargar completa el moment matching sin el error Invalid-Model, con una prueba de regresión que cubra el caso guardado y vuelto a cargar.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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:
fit <- stan(...)
saveRDS(fit,...)
And then loaded and loo (from https://github.com/stan-dev/rstan/blob/develop/rstan/rstan/R/loo.R) was run with:
fit <- loadRDS(...)
loo(fit, moment_match = TRUE)
which throws the following error:
Error in .local(object, ...) :
the model object is not created or not valid
Calls: loo ... apply -> FUN -> <Anonymous> -> <Anonymous> -> .local
Execution halted
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:
cat /etc/*-release
Cluster Manager v9.1
slave
NAME="Red Hat Enterprise Linux"
VERSION="8.2 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.2"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.2 (Ootpa)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:8.2:GA"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_BUGZILLA_PRODUCT_VERSION=8.2
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.2"
Red Hat Enterprise Linux release 8.2 (Ootpa)
Red Hat Enterprise Linux release 8.2 (Ootpa)
R environment specs:
R version 4.1.0 (2021-05-18) -- "Camp Pontanezen"
rstan (version 2.21.2)
Thanks for your help and developing such an awesome package! If this is an rstan and not a loo problem I'm happy to move the issue there.
- Lenguaje dominante
- R
- Estrellas
- 157
- Forks
- 38
- Merge medio
- 4 d 16 h
- PR fusionados (30 d)
- 2
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de stan-dev/loo
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Extend loo_plot_difference Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
-
Clean up issues Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
Todos los issues de stan-dev/loo
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
robjhyndman/forecast#1220 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
JamesHWade/deputy#192 ·
-
bug triage_needed
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
pharmaverse/rtables#1123 · 1 comentario · 1 reacción ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100