Looks like I missed a whole bunch of conversations while I had my head deep in code. I'm going to try to pick things out of past conversations and hopefully the message comes out coherent enough.
On Aug 7, 2013, at 7:38 PM, Michael Betancourt wrote:
> Braces or a suffix'd colon would still be possible,
>
> adapt={mu=5 eta=8 t0=2...}
> --algorithm=hmc={metric=unit_e stepsize=0.1…}
>
> Although that would require some nontrivial parsing work.
A couple points here:
- Braces are a bad idea, I think. I think the shell will do stuff with braces before it enters our program. I think users might be able to get it to us if they quoted or escaped it somehow, but I think it's really not the best option for us.
- Regarding colon: it will be nontrivial parsing work. I would rather not introduce more complexity in our wrapper than necessary. I would prefer to not maintain complex logic / code here.
On Aug 7, 2013, at 11:22 AM, Michael Betancourt wrote:
> It's not so bad. But why no "--" before keys? Is this kosher with
> the command-lines of the world? I've just followed what I've seen in
> other software like a good monkey (of the "monkey see, monkey do" species).
>
> It's cleaner. I think Dan made an executive decision at some point.
On Aug 7, 2013, at 6:45 PM, Bob Carpenter wrote:
>
> > I think we should stick
>> with the conventions.
>
> I agree. This doesn't seem like the place to innovate.
>
> I prefer the verbose names with -- and =, which not
> coincidentally matches the way it was done in 1.0.
Yes, I think I made that call a while ago, but I was thinking along the lines of git subcommands. I didn't think it through. We have a lot more key, value pairs that we deal with.
And yes, I don't want to innovate here. Unfortunately, I don't think there's a good standard. I know it's a little late, but if we're trying to do something more standard, what about using the Boost Program_options library?
http://www.boost.org/doc/libs/1_54_0/doc/html/program_options.html
Unfortunately, it's NOT header only. But if it makes sense to use it, I'll figure it out unless someone else volunteers.
On Aug 8, 2013, at 4:15 PM, Bob Carpenter wrote:
> On 8/7/13 7:24 PM, Michael Betancourt wrote:
>>> Eventually, it might be nice to have the inverse relations.
>>> That is,
>>>
>>> stepsize -> hmc | nesterov | bfgs
>>>
>>> so that if someone enters stepsize and not an appropriate subcommand,
>>> we can be more informative.
>>
>> What we could do is search through the hierarchy for all occurrences and show the possible paths.
>>
> ...
>>> Do we really need to say "adapt" or "random"? It introduces
>>> order constraints and seems very clunky. I'd rather write
>>> adapt_foo for all of its features if we had to and perhaps reuse
>>> the code at a slightly higher level than the names of the args.
>>
>> Personally I like the ability to have categorical arguments like this. For one, it avoids having to rewrite the category name over and over
> > again (imagine the user frustration of having to type adapt_mu=5 adapt_eta=8 adapt_t0=2…).
> > We could add braces adapt={ mu=5 eta=8 t0=2 } but then we'd have to deal with
> > closure checking. Or perhaps just add a trailing colon? adapt: mu=5 eta=8 t0=2?
>
> I'm not saying it's a bad idea. Just that it's unusual,
> and hence provides a bit of a learning curve. So
> and I'm not sure this is where we want to innovate.
> ...
> What do others think here? I could be convinced to innovate
> on the command line. Someone has to do it some time.
I know, there was a lot of discussion here. What I would like is consistency. And hopefully we have enough foresight to provide consistency in the command line interface for at least a few releases. I think we're on the right path.
One thing I did want to mention is that the combinatorics haven't overwhelmed us yet. I still think with the number of options we have for v2.0, we can still have a "flat" subcommand structure even though it acts and feels hierarchical. Or vice versa. For printing help, we can even do what git does and have each subcommand have a char* array which we just pipe to output.
I'll get to the point: we should focus on designing the interaction on the command line.
With that said, I can roll with anything that's consistent, whether that's standard or innovative. Mike's done enough for me to be ok with the options, but if anyone has strong opinions, I'll gladly defer.
On Aug 8, 2013, at 4:15 PM, Bob Carpenter wrote:
> What we probably really need is some kind of config file.
> I took a quick poll. I hate config files, Mitzi loves them :-)
I think it makes sense to have config files eventually.
On Aug 8, 2013, at 7:57 PM, Bob Carpenter wrote:
> On 8/8/13 4:34 PM, Michael Betancourt wrote:
> ...
>> The only problem with
>>
>> --adapt_mu=5 --adapt_eta=8 --adapt_t0=2
>>
>> is that is also forces really awkward strings like
>>
>> --algorithm=hmc_metric=unit_e
>
> That would be have to be compressed. Why not just have
> hmc_metric=unit_e? Why have --algorithm? This is what I'm
> missing conceptually in the new scheme.
I'm with Bob here.
>> Raw categoricals like
>>
>> adapt mu=5 eta=8 t0=2
>>
>> are the easiest option.
>
> That's the current status, right?
I think so. I think "adapt" is the subcommand and "mu=5 eta=8 t0=2" are arguments. If I'm to understand correctly, the standard way to do this is to type:
"adapt --mu=5 --eta=8 --t0=2"
or is it:
"adapt --mu 5 --eta 8 --t0 2"
?
And should something like this be standard too?
"adapt -m=5 -e=8 -t=2"
That would be the single dash abbreviated form. Spaces wouldn't work here.
Daniel