Skip to content

Commit

Permalink
update: add first, simple example
Browse files Browse the repository at this point in the history
for #509
  • Loading branch information
jorgeorpinel committed Aug 1, 2019
1 parent baf6d9b commit 07b4250
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
4 changes: 1 addition & 3 deletions static/docs/commands-reference/import.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,8 @@ external DVC repo, such as our
$ dvc import git@github.com:iterative/example-get-started model.pkl
Importing 'model.pkl (git@github.com:iterative/example-get-started)' -> 'model.pkl'
...
Output 'model.pkl' didn't change. Skipping saving.
Saving information to 'model.pkl.dvc'.
...
```

In contrast with `dvc get`, this command doesn't just download the model file,
Expand Down
29 changes: 29 additions & 0 deletions static/docs/commands-reference/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,32 @@ their DVC-files (via fields `lock: true` and `rev_lock`). For a locked stage,
problems arise, otherwise 1.

- `-v`, `--verbose` - displays detailed tracing information.

## Example

Let's first import a data artifact from our
[get started example repo](https://github.com/iterative/example-get-started):

```dvc
$ dvc import git@github.com:iterative/example-get-started model.pkl
Importing 'model.pkl (git@github.com:iterative/example-get-started)' -> 'model.pkl'
...
Saving information to 'model.pkl.dvc'.
...
```

As DVC mentions, the import stage (DVC-file) `model.pkl.dvc` is created. this
[stage file](/doc/commands-reference/run) is locked by default though, so to
[reproduce](/doc/commands-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:

```dvc
$ dvc update model.pkl.dvc
Stage 'model.pkl.dvc' didn't change.
Output 'model.pkl' didn't change. Skipping saving.
Saving information to 'model.pkl.dvc'.
```

This time nothing has changed (since our Get Started sample repo is pretty
static).

0 comments on commit 07b4250

Please sign in to comment.