From cc5883a41fd868d9ad6e8139f7c2229d80a8fe8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saugat=20Pachhai=20=28=E0=A4=B8=E0=A5=8C=E0=A4=97=E0=A4=BE?= =?UTF-8?q?=E0=A4=A4=29?= Date: Mon, 1 Feb 2021 13:52:15 +0545 Subject: [PATCH 1/3] Add schema keywords in lockfile This is a 2.0 change introduced in https://github.com/iterative/dvc/pull/5222 --- .../project-structure/pipelines-files.md | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/content/docs/user-guide/project-structure/pipelines-files.md b/content/docs/user-guide/project-structure/pipelines-files.md index f4b7790f21..636e8b8314 100644 --- a/content/docs/user-guide/project-structure/pipelines-files.md +++ b/content/docs/user-guide/project-structure/pipelines-files.md @@ -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 @@ -278,6 +280,7 @@ stages: ```yaml # dvc.lock +schema: '2.0' stages: train@0: cmd: python train.py 3 10 @@ -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 build@us: ... ``` @@ -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 From 0cb717d3a3279159e59e045cb8a2df356cb83326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saugat=20Pachhai=20=28=E0=A4=B8=E0=A5=8C=E0=A4=97=E0=A4=BE?= =?UTF-8?q?=E0=A4=A4=29?= Date: Tue, 2 Feb 2021 09:48:52 +0545 Subject: [PATCH 2/3] add size in dvc.lock example --- content/docs/user-guide/project-structure/pipelines-files.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/content/docs/user-guide/project-structure/pipelines-files.md b/content/docs/user-guide/project-structure/pipelines-files.md index 636e8b8314..290325fd94 100644 --- a/content/docs/user-guide/project-structure/pipelines-files.md +++ b/content/docs/user-guide/project-structure/pipelines-files.md @@ -404,10 +404,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 From 17d8040c894341481eb99c01e41d307f8bfc1fb3 Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Mon, 1 Feb 2021 23:06:23 -0600 Subject: [PATCH 3/3] Update content/docs/user-guide/project-structure/pipelines-files.md --- content/docs/user-guide/project-structure/pipelines-files.md | 1 - 1 file changed, 1 deletion(-) diff --git a/content/docs/user-guide/project-structure/pipelines-files.md b/content/docs/user-guide/project-structure/pipelines-files.md index 290325fd94..db56a0879c 100644 --- a/content/docs/user-guide/project-structure/pipelines-files.md +++ b/content/docs/user-guide/project-structure/pipelines-files.md @@ -317,7 +317,6 @@ stages: outs: - path: model-uk.hdfs md5: 17b3d1efc339b416c4b5615b1ce1b97e - size: 2712300 build@us: ... ```