dvc icon indicating copy to clipboard operation
dvc copied to clipboard

`exp run --set-param`: Doesn't support `-` in param name

Open daavoo opened this issue 3 years ago • 8 comments

Introduced in #8067

Appears to be a Hydra limitation that the author doesn't plan to address:

https://github.com/facebookresearch/hydra/issues/514

daavoo avatar Aug 19 '22 13:08 daavoo

My reading of the author's concerns appear to be limited to using -- preceding a parameter name, not use of - anywhere in the parameter name. Are you reading it differently?

dberenbaum avatar Aug 19 '22 15:08 dberenbaum

My reading of the author's concerns appear to be limited to using -- preceding a parameter name, not use of - anywhere in the parameter name. Are you reading it differently?

I guess the thing is that the restriction of - is currently embedded in the grammar rules, no matter where it is used. Allowing - in some cases but not in others would require new rules.

We could explain our use case and see if it makes a difference, as we are using internals directly, or ask if there is an alternative for us.

daavoo avatar Aug 19 '22 15:08 daavoo

I ran into same problem while trying to queue experiments with --set-param options. The binaries in my DVC pipeline use many --some-argument-name style arguments, which work great with DVC's dict unpacking and YAML's support for keys that contain -.

It would be great if --set-param would support these as well.

z1ga avatar Aug 27 '22 14:08 z1ga

@daavoo What do you think about adding this to the backlog since it is a regression in DVC?

dberenbaum avatar Sep 16 '22 17:09 dberenbaum

@daavoo What do you think about adding this to the backlog since it is a regression in DVC?

I assume you mean patching on our side, right?

daavoo avatar Sep 16 '22 18:09 daavoo

No, I meant contributing to hydra 😄 , but patching on our side is also fine.

dberenbaum avatar Sep 16 '22 19:09 dberenbaum

No, I meant contributing to hydra 😄 , but patching on our side is also fine.

I just felt that https://github.com/facebookresearch/hydra/pull/2094 is pretty much done and would fix this issue. I don't see any comment requiring changes, it looks blocked pending the resolution of the discussion so not sure what we could contribute

daavoo avatar Sep 16 '22 20:09 daavoo

Got it. Let's follow in https://github.com/facebookresearch/hydra/issues/2363. Again, no problem with patching on our side for now if that's going to be quicker/easier.

dberenbaum avatar Sep 19 '22 12:09 dberenbaum

Should be fixed in the next hydra release

dberenbaum avatar Sep 29 '22 22:09 dberenbaum

With hydra v1.3.0 it works properly here.


λ dvc version
DVC version: 2.36.0 (pip)

vitalwarley avatar Dec 12 '22 15:12 vitalwarley