You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Last tested with DVC 1.9.1+e21142, last commit in #4734
p.s. the items with check boxes are the most relevant things I found.
Bugs
The "Looping through a dictionary" (given under foreach, not read from vars or params file) example from Implement foreach ... in loop in dvc.yaml #4734 doesn't loop. dvc repro just runs a single stage using the given dict as the only item in the loop.
Edge: When use: none (where none is an invalid/inexistent path) is given, no params file is used. But it seems that params.yaml is still parsed because if vars has a key that already exists in params.yaml, an error is thrown (since overwriting keys is not allowed). However, if the value is removed from vars, the value is not actually read from the params file (also resulting in an error).
It's not possible to dvc repro stage groups, since the final stage name is built from vars/params values. E.g. in the "Looping through a list" example of Implement foreach ... in loop in dvc.yaml #4734, dvc repro build doesn't work. You can however dvc repro build-foo (which is fine). I think that entire groups should be valid targets too.
Should use be called params-file or import? "use" seems like it has a different meaning i.e. pipelines "use" all sorts of things (e.g. dependencies) and the keyword use in some languages has to do with namespaces (e.g. in PHP).
use accepts inexistent paths, resulting in silently not loading any params file, even if params.yaml is present. I like this as use: none could be a useful trick, but should it at warn that the given file doesn't exist?
If use is given a directory path, it prints a generic unexpected error - [Errno 13] Permission denied: '{path}'. How about a check that the given path is a valid YAML file?
When vars used in dvc.yaml don't exist in the params file or vars, you get ERROR: unexpected error - Could not find '{key}' in {}: '{key}' - improve error messageHow about a more informative message like "{key} not found in 'dvc.yaml'vars` or '{params-file}'." ?
vars cannot overwrite values in the params file, if both are used. Is this a desired limitation?
Bugs
The "Looping through a dictionary" (given under
foreach, not read fromvarsor params file) example from Implement foreach ... in loop in dvc.yaml #4734 doesn't loop.dvc reprojust runs a single stage using the given dict as the only item in the loop.Edge: When
use: none(wherenoneis an invalid/inexistent path) is given, no params file is used. But it seems that params.yaml is still parsed because ifvarshas a key that already exists in params.yaml, an error is thrown (since overwriting keys is not allowed). However, if the value is removed fromvars, the value is not actually read from the params file (also resulting in an error).Usability
Foreach loops: since
in:is always followed bycmd:what about just avoidinand go straight tocmd, etc.? Like this:It's not possible to
dvc reprostage groups, since the final stage name is built from vars/params values. E.g. in the "Looping through a list" example of Implement foreach ... in loop in dvc.yaml #4734,dvc repro builddoesn't work. You can howeverdvc repro build-foo(which is fine). I think that entire groups should be valid targets too.Shouldbe calleduseparams-fileorimport? "use" seems like it has a different meaning i.e. pipelines "use" all sorts of things (e.g. dependencies) and the keywordusein some languages has to do with namespaces (e.g. in PHP).useaccepts inexistent paths, resulting in silently not loading any params file, even if params.yaml is present. I like this asuse: nonecould be a useful trick, but should it at warn that the given file doesn't exist?Ifis given a directory path, it prints a generic unexpected error -use[Errno 13] Permission denied: '{path}'.How about a check that the given path is a valid YAML file?When vars used in dvc.yaml don't exist in the params file or
vars, you getERROR: unexpected error - Could not find '{key}' in {}: '{key}'- improve error messageHow about a more informative message like "{key} not found in 'dvc.yaml'vars` or '{params-file}'." ?varscannot overwrite values in the params file, if both are used. Is this a desired limitation?