Run in the cloud option for Stan

@s.maskell raised the issue of having an easy way to run a Stan model in the cloud at Thursday’s meeting. I thought it an excellent idea and didn’t want to let it drop.

There is an server interface: GitHub - stan-dev/httpstan: HTTP interface to Stan, a package for Bayesian inference. that was mentioned that covers half the problem (hosting). Client should be fairly straightforward.

@storopoli suggested an option at the cmdstanR level, something like:

library("cmdstanr")
model <- cmdstan_model("my_slow_model.stan", server = "https://monster_server_farm",...)
fit <- model$fit(data = stanData)

Someone, can’t remember who, mentioned that RStudio already has a launcher feature that may already offer full on hosting since they do run Stan in RStudio cloud. I have sent an email asking about pricing, what interfaces are run etc… This is a GUI integrated ‘run in the cloud’ service on first examination: Using Background Jobs in the RStudio IDE - RStudio :: Solutions

I’ll report back on the RStudio Launcher feature.

Please add ideas/elaborate as you see fit.

Breck

1 Like

@breckbaldwin: I posted but potentially with obscure/erroneous topics. See here: Seamlessly Running Stan Much Faster (using AWS/HPC etc) - #2 by s.maskell

Not sure if it matters that we have parallel threads.

We should merge the topics, unaware of how to do that. Whether it is ‘general’ or ‘interfaces’ is up for interpretation. I’ll add my post to your thread and see if I can shut this one down.

B

there are many ways to run Stan in the cloud, depending on what you mean by “running in the Cloud”.
for teaching purposes, Jupyter notebooks + Google colab as host are a possibilitiy. blog post here: Stan Notebooks in the Cloud

I think a lot of people are using docker containers on AWS, judging from the number of previous threads on this topic on the forums - cf Docker & Stan ?!