-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Using expose_functions() errors when model binary already exists #784
Comments
Thanks for reporting this. I agree there should be a more informative message. @andrjohns what do you think? Should we add a message saying that recompilation is necessary (if that's the issue here)? |
This came up again in #819 from @maxbiostat. @andrjohns What was the intended behavior when the model is already compiled? Should there just be an informative error message saying to recompile? Should it recompile automatically in order to compile the functions? Something else? Thanks! |
@andrjohns This error keeps coming up (see e.g. #819 and #830). Do you have time to look into this? If you don't have time right now no worries, I can try to take care of it, you're just more familiar with the expose_functions code. |
Closed by #831 |
Describe the bug
When using
cmdstan_model("mymod.stan", compile_standalone = TRUE)
and themymod
executable already exists (so nothing is (re)compiled) then$expose_functions()
returns the error:If this is not a bug, I'd think that maybe a clearer error message would help.
To Reproduce
On first compilation everything runs as expected.
Then restart the R session
Expected behavior
I expected that the Stan function would be available (in the global environment, or at least in the model environment) even when recompilation of the model is not necessary.
Operating system
macOS Ventura 13.1
CmdStanR version number
cmdstanr: 0.5.3 (from
remotes::install_github("stan-dev/cmdstanr")
)cmdstan_version(): 2.32.2
Additional context
none
The text was updated successfully, but these errors were encountered: