$ dvc run -f -n hasparam -p var "echo \${var}"
ERROR: unexpected error - 'outs'
TBH I'm not sure under what conditions this happens or if it's definitely related to the 2.0 dvc.yaml changes. The verbose output seems to indicate it's also related to the run-cache (so feel free to extract this to its own issue).
Bugs?
Defining a stage with
dvc reproisn't fully compatible with using${}substitutions in commands e.g.$ dvc run -n echovar "echo \${var}"runs
echo ${var}in which is interpreted by the terminal (and probablyvardoesn't exist in the env, so an empty line is printed).Upon
dvc repro, the command executed is different: readsvarfrom params.yaml (assuming it exists, otherwise errors out) and substitutes it in thecmd, for exampleecho foo(the value of thevarparam is printed).(Fixed in run-cache: skip unhashable stages #5185) A strange edge error occurs when you try to overwrite a stage that has
paramsand${}substitution withdvc run --force. E.g.:TBH I'm not sure under what conditions this happens or if it's definitely related to the 2.0 dvc.yaml changes. The verbose output seems to indicate it's also related to the run-cache (so feel free to extract this to its own issue).
Feature design
It's not possible to combine
foreachandvarsin a multi-stage.dvc reprogives the following error:ERROR: 'dvc.yaml' format error: extra keys not allowed @ data['stages']['mystage']['foreach']Similarly, shouldn't
wdirbe able work with hardcoded localvars? Not from params files listed in localvarsthough, I get why that's not possible.Other