Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add schema keywords in lockfile #2131

Merged
merged 3 commits into from
Feb 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 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,11 +310,13 @@ stages:

```yaml
# dvc.lock
schema: '2.0'
stages:
build@uk:
cmd: python train.py 'uk' 3 10
outs:
- model-uk.hdfs
- path: model-uk.hdfs
md5: 17b3d1efc339b416c4b5615b1ce1b97e
build@us: ...
```

Expand Down Expand Up @@ -385,6 +390,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 All @@ -397,10 +403,13 @@ stages:
outs:
- path: features
md5: 2119f7661d49546288b73b5730d76485
size: 154683
- path: performance.json
md5: ea46c1139d771bfeba7942d1fbb5981e
size: 975
- path: logs.csv
md5: f99aac37e383b422adc76f5f1fb45004
size: 695947
```

Stages are listed again in `dvc.lock`, in order to know if their definitions
Expand Down