Protobuf style guides


#1

I’ve discovered a few useful Protocol Buffers style guides. These might be useful for the protocol buffers writer project.

Uber’s seems like the most comprehensive. I think there’s even a linter associated with it.

/cc @sakrejda


#2

These look good, I offered to help with threading and I need to evaluate whether cleaning up var context should go before or after protobuf interfacing. So finishing this is in the queue but not happening quite yet


#3

Thanks. This should be really helpful when we get down to schema design.

I’d like to start with higher-level requirements. I think we’re going to need several data formats:

  1. Structured data: replaces non-standard, restricted, R format for data and parameter inputs

  2. Algorithm output: replaces CSV with hacked comments
    a. fit consisting of one or more parameter values (draws, etc.)
    b. algorithm diagnostics

  3. Algorithm configuration — replaces CmdStan arguments

  4. Stan programs, libraries — just text so far, but we might need something like dictionaries for includes

We have a round-trip requirement in going from algorithm parameter outputs to data inputs.

The biggest point of contention up to now has been whether the algorithm output needs to be streamed with full metadata per “row” that is output. Do the style guides have things to say about this?

Maybe we should start with data input, as I suspect it’s going to be the simplest and least contentious.

/cc @seantalts @syclik (p.s. I like this convention!)


#4

My one piece of advice here is to choose a format and protocol that allows streaming output from Stan. This comes in handy in a variety of ways - imagine web-based interfaces that can display partial results or diagnostics while Stan is fitting a model.