From db9832ceb6bd13dd9dae129e77488c71c468b901 Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Thu, 21 Jan 2021 13:08:42 -0600 Subject: [PATCH] guide: clarifications to dvc.yaml rel https://github.com/iterative/dvc/issues/5312#issuecomment-765550384 --- .../docs/user-guide/project-structure/pipelines-files.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/content/docs/user-guide/project-structure/pipelines-files.md b/content/docs/user-guide/project-structure/pipelines-files.md index fc594a6851..bfea3a82f2 100644 --- a/content/docs/user-guide/project-structure/pipelines-files.md +++ b/content/docs/user-guide/project-structure/pipelines-files.md @@ -219,8 +219,8 @@ ${param.key} # Nested values through . (period) ${param.list[0]} # List elements via index in [] (square brackets) ``` -> To use the expression literally in `dvc.yaml`, escape it with a backslash, -> e.g. `\${...`. +> To use the expression in `dvc.yaml`, for example for the shell to interpret a +> command substitution, escape it with a backslash, e.g. `\${...`. ## Generating multiple stages @@ -238,6 +238,8 @@ stages: - raw2 labels2 do: cmd: clean.py "${item}" + out: + - ${item}.cln ``` Upon `dvc repro`, each item in the list is expanded into its own stage by @@ -265,7 +267,8 @@ stages: thresh: 10 - epochs: 10 thresh: 15 - cmd: python train.py ${item.epochs} ${item.thresh} + do: + cmd: python train.py ${item.epochs} ${item.thresh} ``` ```yaml