Skip to content

Commit

Permalink
tweak log_artifact language
Browse files Browse the repository at this point in the history
  • Loading branch information
dberenbaum committed Jul 31, 2023
1 parent f8ee570 commit 94df019
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
14 changes: 10 additions & 4 deletions content/docs/dvclive/live/log_artifact.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,21 @@ with Live() as live:

## Description

Uses `dvc add` to [track] `path` with DVC, saving it to the DVC
<abbr>cache</abbr> and generating a `{path}.dvc` file that acts as a pointer to
the cached data.
Log `path`, saving its contents to DVC storage. Also annotate with any included
metadata fields (for example, to be consumed in [Studio model registry] or
automation scenarios).

If `cache=True` (which is the default), uses `dvc add` to [track] `path` with
DVC, saving it to the DVC <abbr>cache</abbr> and generating a `{path}.dvc` file
that acts as a pointer to the cached data.

If `Live` was initialized with `dvcyaml=True` (which is the default) and you
include any of the optional metadata fields (`type`, `name`, `desc`, `labels`,
`meta`), it will add an
[artifact](/doc/user-guide/project-structure/dvcyaml-files#artifacts) and all
the metadata passed as arguments to the corresponding `dvc.yaml`. Passing
`type="model"` will mark it as a `model` for DVC and will make it appear in
[Studio Model Registry](/doc/studio).
[Studio model registry].

## Parameters

Expand Down Expand Up @@ -81,3 +85,5 @@ the metadata passed as arguments to the corresponding `dvc.yaml`. Passing
have a supported type.

[track]: /doc/dvclive/how-it-works#track-large-artifacts-with-dvc
[Studio model registry]:
/doc/studio/user-guide/model-registry/what-is-a-model-registry)
10 changes: 4 additions & 6 deletions content/docs/dvclive/ml-frameworks/pytorch-lightning.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,10 @@ checkpointing at all as described in the

### Log model checkpoints

Use `log_model` to save the checkpoints. DVCLive will first delete checkpoints
from previous <abbr>experiments</abbr> (since DVC tracks checkpoints per
experiment) and then <abbr>cache</abbr> the entire checkpoints directory using
`Live.log_artifact()`. At the end of training, DVCLive will annotate the
[`best_model_path`][`ModelCheckpoint`] with `type=model` and `name=best` for use
in [Studio model registry].
Use `log_model` to save the checkpoints (it will use `Live.log_artifact()`
internally to save those). At the end of training, DVCLive will annotate the
[`best_model_path`][`ModelCheckpoint`] with name `best` (for example, to be
consumed in [Studio model registry] or automation scenarios).

- Save updates to the checkpoints directory at the end of training:

Expand Down

0 comments on commit 94df019

Please sign in to comment.