stan-dev / stan-dev/rstan

Feature Request: Force model recompile in stan() or automate recompile if saved dso is from a different platform

Open
#984 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
1.1k
Forks
266
Avg merge
2h 56m
Merged PRs (30d)
1

Description

Summary:

It would be helpful to have an argument in stan() to force a model recompile, or for stan() to automatically recompile if it discovers that the saved dso was compiled on a different platform

Description:

When collaborating with colleagues using different platforms, or when one uses a mix of platforms oneself, stan() will fail because the saved dso was compiled on the wrong platform. There is no obvious way to write code to find and remove the compiled model and there is no setting in stan() to force a recompile. Seemingly the only way to force a recompile within R is to trivially modify the model code (eg adding a white space). There should be an argument for this in the relevant rstan functions so that it is possible to write code that works reliably when used by multiple researchers accessing the same scripts via a syncing service (eg Dropbox) as this is a very common use case.

Contributor guide

No contributing guide indexed for this repository

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

The requested entry point is stan() in the RStan interface; start by tracing how it reuses saved DSOs and how platform mismatches are surfaced. Define whether an explicit force-recompile argument or automatic platform check is intended, then verify that shared scripts recompile safely across platforms.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.