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

Add option for linking and executing models through R/Rcpp to avoid admin issues with executables #918

Open
andrjohns opened this issue Feb 9, 2024 · 2 comments

Comments

@andrjohns
Copy link
Collaborator

As discussed in #815 and many other issues and forum posts, users in organisations aren't able to use cmdstanr (or at least not without some difficulty) due to organisational restrictions in running arbitrary executables.

To avoid this, we could add an option to instead execute the model via Rcpp - by linking the compiled object file as an R-compatible DLL via R CMD SHLIB. This is essentially how rstan models are executed.

Much of the minutiae in platform-specific handling for this will be covered in #894, the main complexity will come from plumbing it into the $sample()/$optimize()/etc methods

@WardBrian
Copy link
Member

Not to be a member of the peanut gallery, but wouldn't that mean this package basically has to maintain both something at the level of complexity of rstan and an interface for cmdstan?

@andrjohns
Copy link
Collaborator Author

Not to be a member of the peanut gallery, but wouldn't that mean this package basically has to maintain both something at the level of complexity of rstan and an interface for cmdstan?

No, it's just linking the existing model object to an Rcpp function which calls cmdstan::command, you can see an example of this kind of function on this StanEstimators branch.

The rstan approach is to completely reimplement cmdstan in R

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants