0

我想传入一个配置,如:

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

我想在命令行上执行此操作,类似于:

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

显然,这会给我:

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

...这不是我想要的。.使用点符号时如何转义任何句点 ( ) omegaconf.OmegaConf.from_cli()

4

2 回答 2

0

这是不支持的。您可以提交功能请求,但它不会是高优先级。我建议您在密钥中使用不同的分隔符。

于 2020-11-17T01:18:29.377 回答
0

根据此处的评论,我认为您可以执行以下操作:

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

但是我从来没有使用过omegaconf,所以请不要因为猜测而殴打我:)

于 2020-11-16T19:49:42.890 回答