Skip to content

Commit

Permalink
Add schema keywords in lockfile
Browse files Browse the repository at this point in the history
This is a 2.0 change introduced in iterative/dvc#5222
  • Loading branch information
skshetry committed Feb 1, 2021
1 parent 11e7368 commit d5bb74f
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions content/docs/user-guide/project-structure/pipelines-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,14 @@ each stage name after a `@`. The final stages generated by the `foreach` syntax
are saved to `dvc.lock`:

```yaml
cleanups@raw2 labels2:
cmd: echo "raw2 labels2"
cleanups@raw1:
cmd: echo "raw1"
cleanups@labels1:
cmd: echo "labels1"
schema: '2.0'
stages:
cleanups@raw2 labels2:
cmd: echo "raw2 labels2"
cleanups@raw1:
cmd: echo "raw1"
cleanups@labels1:
cmd: echo "labels1"
```

For lists containing complex values (e.g. dictionaries), the substitution
Expand All @@ -278,6 +280,7 @@ stages:

```yaml
# dvc.lock
schema: '2.0'
stages:
train@0:
cmd: python train.py 3 10
Expand Down Expand Up @@ -307,6 +310,7 @@ stages:

```yaml
# dvc.lock
schema: '2.0'
stages:
build@uk:
cmd: python train.py 'uk' 3 10
Expand Down Expand Up @@ -385,6 +389,7 @@ DVC will maintain a `dvc.lock` file for each `dvc.yaml`. Their purposes include:
Here's an example:

```yaml
schema: '2.0'
stages:
features:
cmd: jupyter nbconvert --execute featurize.ipynb
Expand Down

0 comments on commit d5bb74f

Please sign in to comment.