1

I want to pass in a config like:

foo
    blah.bar: blah.bar
    another.thing: some.thing

And I want to do this on the commmandline, osmething like:

python my_script.py foo.blah.bar=blah.bar foo.another.thing=some.thing

Obviously, this would give me instead:

foo
    blah
        bar: blah.bar
    another
        thing: some.thing

... which is not what I want. How can I escape any periods (.) when using dot notation with omegaconf.OmegaConf.from_cli() ?

Hugh Perkins
  • 7,975
  • 7
  • 63
  • 71

2 Answers2

0

Based on the comment here, I think you could do something like:

python my_script.py foo[blah.bar]=blah.bar foo[another.thing]=some.thing

But I've never used omegaconf, so please don't beat me up for guessing :)

Marc
  • 11,403
  • 2
  • 35
  • 45
0

This is not supported. You can file a feature request but it's not going to be high priority. I suggest that you use a different separator in your keys.

jtlz2
  • 7,700
  • 9
  • 64
  • 114
Omry Yadan
  • 31,280
  • 18
  • 64
  • 87