Checkpointing CmdStan sampling

If they were read from a file implementing it for cmdstan would be pretty easy for someone with a day or two to spare…

I’m down to try (if nobody else is doing yet). I want this feature.

Had a look at the cmdStan source. Looks like the main entry point is https://github.com/stan-dev/cmdstan/blob/develop/src/cmdstan/command.hpp?

If I did:

  1. Add an argument to specify a mass matrix/vector file
  2. Read in the mass matrix as a context using get_var_context (which looks like it reads the cmdstan Rdump file formats)
  3. Pass that context to the hmc_nuts_dense_e/whatever constructors
  4. Some sorta tests?

You (or @mitzimorris) see anything missing from that?

And what would tests for this look like?