Specifying parameter values in nested hierarchy from the command line

21 views
Skip to first unread message

Maximilian Albert

unread,
Nov 3, 2015, 7:42:19 PM11/3/15
to sumatr...@googlegroups.com
Hi,

let's assume that I have a parameter file with a nested structure, such as the following YAML file:

  foo:
    bar: 42
    baz: 23

  quux:
    bar: 55

Is there a way to specify different values for these parameters from the command line as part of a "smt run" command, or does Sumatra currently only support "flat" hierarchies in parameter files?

Thanks,
Max

Andrew Davison

unread,
Nov 5, 2015, 10:10:05 AM11/5/15
to sumatr...@googlegroups.com
Hi,
You might be able to use:

$ smt run parameters.yml foo.bar=43 foo.baz=24 quux.bar=56

i.e. using "." to indicate the hierarchy. I can't remember if this works. If it doesn't work, please could you create a ticket in the issue tracker?

Best regards,

Andrew

Maximilian Albert

unread,
Nov 6, 2015, 10:57:43 AM11/6/15
to sumatr...@googlegroups.com
2015-11-05 15:10 GMT+00:00 Andrew Davison <andrew....@unic.cnrs-gif.fr>:
Hi,
> On 04 Nov 2015, at 01:42, Maximilian Albert <maximili...@gmail.com> wrote:
>
> let's assume that I have a parameter file with a nested structure, such as the following YAML file:
>
>   foo:
>     bar: 42
>     baz: 23
>
>   quux:
>     bar: 55
>
> Is there a way to specify different values for these parameters from the command line as part of a "smt run" command, or does Sumatra currently only support "flat" hierarchies in parameter files?

You might be able to use:

  $ smt run parameters.yml foo.bar=43 foo.baz=24 quux.bar=56

i.e. using "." to indicate the hierarchy. I can't remember if this works.

Thanks for the suggestion. I had tried this before, but it didn't work. I have created an issue here: https://github.com/open-research/sumatra/issues/302

Cheers,
Max
Reply all
Reply to author
Forward
0 new messages