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 1 commit
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
21 changes: 14 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,14 @@ 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
size: 2712300
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

@jorgeorpinel jorgeorpinel Feb 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, they are OK in the latter example but I'll remove it from here to simplify. I'll make a follow-up PR to explain the size (and nfiles?) fields in dvc.lock.

Suggested change
size: 2712300

UPDATE: See #2139

build@us: ...
```

Expand Down Expand Up @@ -385,6 +391,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