From 94df019ae39a26161999bfd21f0b6f1148e9e32c Mon Sep 17 00:00:00 2001 From: dberenbaum Date: Sun, 30 Jul 2023 20:59:59 -0400 Subject: [PATCH] tweak log_artifact language --- content/docs/dvclive/live/log_artifact.md | 14 ++++++++++---- .../dvclive/ml-frameworks/pytorch-lightning.md | 10 ++++------ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/content/docs/dvclive/live/log_artifact.md b/content/docs/dvclive/live/log_artifact.md index 9e0c91ca35..89edcdbadd 100644 --- a/content/docs/dvclive/live/log_artifact.md +++ b/content/docs/dvclive/live/log_artifact.md @@ -36,9 +36,13 @@ with Live() as live: ## Description -Uses `dvc add` to [track] `path` with DVC, saving it to the DVC -cache 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 cache 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`, @@ -46,7 +50,7 @@ include any of the optional metadata fields (`type`, `name`, `desc`, `labels`, [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 @@ -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) diff --git a/content/docs/dvclive/ml-frameworks/pytorch-lightning.md b/content/docs/dvclive/ml-frameworks/pytorch-lightning.md index 9438250be8..af2fa5e08a 100644 --- a/content/docs/dvclive/ml-frameworks/pytorch-lightning.md +++ b/content/docs/dvclive/ml-frameworks/pytorch-lightning.md @@ -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 experiments (since DVC tracks checkpoints per -experiment) and then cache 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: