I've been playing around with some JSON-based configuration for modeling scripts (https://github.com/sakrejda/context) loosely based on the discussions flying around about for Stan's configuration API and I would be interested in working on a server/JSON interface for Stan, but not before August.
Krzysztof
p.s.-there's also a stale pull request of mine that I need to update once I have a little time but I haven't forgotten about it. Likely late July.
My original thought was to do a request-reply type interface using RZMQ so that the requesting process (i.e. on my laptop) would block while waiting for the server reply. My primary motivation for doing this would be to preserve the order of a make-based buildchain that looks something like:
raw data -> data munging in R -> run stan model -> post-process stan -> 'compile' to figures & Latex.
-Jon
I think in an ideal world, the reply would be a URL to the traces stored somewhere, e.g. in S3 or just on the server. That way if you had some kind of distributed workflow, you could pass that reference around rather than having a ton of traffic up and down for large output.
One component of this kind of server implementation might also be an efficient database backend for post-processing. For example, one of the things I did like about working with PyMC was the ability to store the output of models in an HDF5 database.
-Jon
Does that refactor have an informal milestone more specific than "future"?
Also, there's no reason something like this couldn't be compatible with the current CSV-based output, i.e. instead of writing a running model into the DB, just post-process it into it, since the benefit is mostly in access time rather than write time.
It would also make it easy to bundle the input data with the output (a perennial issue at least for me), since it has support for collections of data objects with heterogeneous links. A bit like a NoSQL kind of database but without all the unnecessary features and much, much better compression and access.
-Jon
Not as ambitious as the Stan-as-a service, but I put together a few Dockerfiles for rstan (built on top of rstudio) and cmdstan while I was trying to scale out my computing. Here's the repo on github: https://github.com/jrnold/docker-stan
'rstan::set_cppo("fast")' cat("\nCC=clang", "CXX=clang++",
file = M, sep = "\n", append = TRUE)
library(rstan)
rstan_options(auto_write = TRUE)
options(mc.cores = parallel::detectCores())