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

Are ALL stan models recompiled when a package is updated? #80

Closed
EoinTravers opened this issue Sep 22, 2020 · 3 comments
Closed

Are ALL stan models recompiled when a package is updated? #80

EoinTravers opened this issue Sep 22, 2020 · 3 comments

Comments

@EoinTravers
Copy link

Well done on a great tool.

I'm interested in developing an internal package containing of compiled versions of models that are frequently used by my colleagues and I, kind of like an in-house version of hBayesDM.

Let's say the package is configured with rstan_create_package(), and installed (from GitHub) on several machines. The package is then updated to add a new model. Will installing the update require that all the existing models, which haven't changed between versions, be recompiled, or can this be avoided?

Thanks.

@jgabry
Copy link
Member

jgabry commented Sep 28, 2020

Well done on a great tool.

Thanks, glad you like it!

Let's say the package is configured with rstan_create_package(), and installed (from GitHub) on several machines. The package is then updated to add a new model. Will installing the update require that all the existing models, which haven't changed between versions, be recompiled, or can this be avoided?

Unfortunately I'm not sure how to avoid that. I'm pretty sure that the functions for installing R packages from GitHub replace the entire package source code every time, so everything would need to get recompiled. In theory I could see it being possible to just replace the changed parts of the package when installing from GitHub but I'm not aware of a tool that does that at the moment. But maybe it exists and I just don't know about it.

@EoinTravers
Copy link
Author

Thanks.
I guess the alternative would have to be a wrapper that compiles and saves a model the first time it's used, and loads the compiled version otherwise.

@andrjohns
Copy link
Collaborator

Closing this as it can't be resolved by rstantools - there currently isn't a mechanism for only partially replacing installed R packages when updating/re-installing

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

3 participants