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

docs: rename dvc lock -> dvc freeze #1380

Merged
merged 5 commits into from
Jun 3, 2020
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions config/prismjs/dvc-commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = [
'version',
'update',
'unprotect',
'unlock',
'unfreeze',
'tag',
'status',
'run',
Expand Down Expand Up @@ -36,7 +36,6 @@ module.exports = [
'metrics',
'params diff',
'params',
'lock',
'list',
'install',
'init',
Expand All @@ -46,6 +45,7 @@ module.exports = [
'get-url',
'get',
'gc',
'freeze',
'fetch',
'diff',
'destroy',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
# lock
# freeze

Lock a [DVC-file](/doc/user-guide/dvc-file-format)
([stage](/doc/command-reference/run)). Use `dvc unlock` to unlock the file.
Freeze a [stage](/doc/command-reference/run). Use `dvc unfreeze` to unfreeze the
stage.

## Synopsis

```usage
usage: dvc lock [-h] [-q | -v] targets [targets ...]
usage: dvc freeze [-h] [-q | -v] targets [targets ...]

positional arguments:
targets DVC-files to lock.
targets stages to freeze.
```

## Description

`dvc lock` causes any DVC-file to be considered _not changed_ by `dvc status`
and `dvc repro`. Stage reproduction will not execute regenerate
<abbr>outputs</abbr> of locked stages, even if some dependencies have changed,
`dvc freeze` causes any stage to be considered _not changed_ by `dvc status` and
`dvc repro`. Stage reproduction will not execute the command or regenerate
<abbr>outputs</abbr> of frizen stages, even if some dependencies have changed,
and even if `--force` is provided.
efiop marked this conversation as resolved.
Show resolved Hide resolved

Locking a stage is useful to avoid syncing data from the top of its
Freezing a stage is useful to avoid syncing data from the top of its
[pipeline](/doc/command-reference/pipeline), and keep iterating on the last
(unlocked) stages only.
(unfrozen) stages only.

Note that <abbr>import stages</abbr> are considered always locked. Use
Note that <abbr>import stages</abbr> are considered always frozen. Use
`dvc update` to update the corresponding <abbr>data artifacts</abbr> from the
external data source. [Unlock](/doc/command-reference/unlock) them before using
`dvc repro` on a pipeline that needs their outputs.
external data source. [Unfreeze](/doc/command-reference/unfreeze) them before
using `dvc repro` on a pipeline that needs their outputs.

## Options

Expand Down Expand Up @@ -68,21 +68,21 @@ foo.dvc
changed: foo
```

Now, let's lock the `bar` stage:
Now, let's freeze the `bar` stage:

```dvc
$ dvc lock bar.dvc
$ dvc freeze bar.dvc
$ dvc status

foo.dvc
outs
changed: foo
```

Run `dvc unlock` to unlock it back:
Run `dvc unfreeze` to unfreeze it back:

```dvc
$ dvc unlock bar.dvc
$ dvc unfreeze bar.dvc
$ dvc status

bar.dvc
Expand Down
2 changes: 1 addition & 1 deletion content/docs/command-reference/pipeline/show.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ instead of stages.

- `--tree` - list dependencies tree like recursive directory listing.

- `-l`, `--locked` - print locked stages only. See `dvc lock`.
- `-l`, `--locked` - print frozen stages only. See `dvc freeze`.

- `-h`, `--help` - prints the usage/help message, and exit.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# unlock
# unfreeze

Unlock [DVC-file](/doc/user-guide/dvc-file-format)
([stage](/doc/command-reference/run)). See `dvc lock` for more information.
Unfreeze [stage](/doc/command-reference/run). See `dvc freeze` for more
information.

## Synopsis

```usage
usage: dvc unlock [-h] [-q | -v] targets [targets ...]
usage: dvc unfreeze [-h] [-q | -v] targets [targets ...]

positional arguments:
targets DVC-files to unlock.
targets stages to unfreeze.
```

## Description

There are several reasons that can produce data files to be locked in a DVC
project, `dvc lock` being the most obvious one.
There are several reasons that can produce data files to be frozen in a DVC
project, `dvc freeze` being the most obvious one.

If `dvc unlock` is used on locked stages, they will start to be checked by
If `dvc unfreeze` is used on frozen stages, they will start to be checked by
`dvc status`, and updated by `dvc repro`.

Note that <abbr>import stages</abbr> are considered always locked. They can not
be unlocked. Use `dvc update` on them to update the file, directory, or
Note that <abbr>import stages</abbr> are considered always frozen. They can not
be unfrozen. Use `dvc update` on them to update the file, directory, or
<abbr>data artifact</abbr> from its external data source.

## Options
Expand Down Expand Up @@ -64,21 +64,21 @@ foo.dvc
changed: foo
```

Now, let's lock the `bar` stage:
Now, let's freeze the `bar` stage:

```dvc
$ dvc lock bar.dvc
$ dvc freeze bar.dvc
$ dvc status

foo.dvc
outs
changed: foo
```

Run `dvc unlock` to unlock it back:
Run `dvc unfreeze` to unfreeze it back:

```dvc
$ dvc unlock bar.dvc
$ dvc unfreeze bar.dvc
$ dvc status

bar.dvc
Expand Down
10 changes: 5 additions & 5 deletions content/docs/command-reference/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ imported file, directory, or <abbr>data artifact</abbr> up to date.
To indicate which import stages to update, we must specify the corresponding
DVC-file `targets` as command arguments.

Note that import stages are considered always locked, meaning that if you run
Note that import stages are considered always frozen, meaning that if you run
`dvc repro`, they won't be updated. `dvc update` is the only command that can
update them.

Expand Down Expand Up @@ -68,10 +68,10 @@ Importing 'model.pkl ([email protected]:iterative/example-get-started)'
```

As DVC mentions, the import stage (DVC-file) `model.pkl.dvc` is created. This
[stage file](/doc/command-reference/run) is locked by default though, so to
[reproduce](/doc/command-reference/repro) it, we would need to run `dvc unlock`
on it first, then `dvc repro` (and `dvc lock` again). Let's just run
`dvc update` on it instead:
[stage file](/doc/command-reference/run) is frozen by default though, so to
[reproduce](/doc/command-reference/repro) it, we would need to run
`dvc unfreeze` on it first, then `dvc repro` (and `dvc freeze` again). Let's
just run `dvc update` on it instead:

```dvc
$ dvc update model.pkl.dvc
Expand Down
8 changes: 4 additions & 4 deletions content/docs/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@
"slug": "list"
},
{
"label": "lock",
"slug": "lock"
"label": "freeze",
"slug": "freeze"
},
efiop marked this conversation as resolved.
Show resolved Hide resolved
{
"label": "metrics",
Expand Down Expand Up @@ -391,8 +391,8 @@
"slug": "status"
},
{
"label": "unlock",
"slug": "unlock"
"label": "unfreeze",
"slug": "unfreeze"
},
{
"label": "unprotect",
Expand Down
2 changes: 2 additions & 0 deletions redirects-list.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
"^/doc/commands-reference(/.*)?$ /doc/command-reference$1",
"^/doc/use-cases/data-and-model-files-versioning/?$ /doc/use-cases/versioning-data-and-model-files",
"^/doc/command-reference/plot$ /doc/command-reference/plots",
"^/doc/command-reference/lock$ /doc/command-reference/freeze",
"^/doc/command-reference/unlock$ /doc/command-reference/unfreeze",

"^/(.+)/$ /$1"
]