Skip to content
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

Model errors after sampling if compiled with compile_model_methods = TRUE #793

Closed
jgabry opened this issue Jul 25, 2023 · 0 comments · Fixed by #801
Closed

Model errors after sampling if compiled with compile_model_methods = TRUE #793

jgabry opened this issue Jul 25, 2023 · 0 comments · Fixed by #801
Assignees
Labels
bug Something isn't working

Comments

@jgabry
Copy link
Member

jgabry commented Jul 25, 2023

@andrjohns Any idea what's going on here?

Describe the bug

Model errors after sampling if compiled with compile_model_methods = TRUE

To Reproduce

stan_file <- write_stan_file(
"
 parameters {
   real x;
 }
 model {
   x ~ std_normal();
 }
 "
)
mod <- cmdstan_model(stan_file, compile_model_methods = TRUE)
fit <- mod$sample()

This samples but then errors before returning with

Error: Expecting a single string value: [type=NULL; extent=0].
Called from: env$model_ptr(data, seed)

Expected behavior

No error.

Operating system

Mac Big Sur

CmdStanR version number

Latest on GitHub

@jgabry jgabry added the bug Something isn't working label Jul 25, 2023
@jgabry jgabry assigned jgabry and andrjohns and unassigned jgabry Jul 25, 2023
@jgabry jgabry mentioned this issue Jul 26, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants