stan-dev / stan-dev/cmdstanr

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

Open
#918 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
160
Forks
69
Avg merge
1d 19h
Merged PRs (30d)
15

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the discussions in #815 and #894 first to understand the proposed R/Rcpp execution path and platform-specific handling. Then trace how $sample(), $optimize(), and related methods currently execute models. Done means an option can execute models through an R-compatible DLL without requiring users to run arbitrary executables.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.