Skip to content

live: Add log_artifact#4373

Merged
daavoo merged 6 commits into
mainfrom
log-artifact
Mar 13, 2023
Merged

live: Add log_artifact#4373
daavoo merged 6 commits into
mainfrom
log-artifact

Conversation

@daavoo
Copy link
Copy Markdown
Contributor

@daavoo daavoo commented Mar 9, 2023

@daavoo daavoo self-assigned this Mar 9, 2023
@daavoo daavoo requested a review from dberenbaum March 9, 2023 14:10
@daavoo daavoo added the C: dvclive Content of /doc/dvclive label Mar 9, 2023
@shcheklein shcheklein temporarily deployed to dvc-org-log-artifact-fzpfcrjkr March 9, 2023 14:12 Inactive
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2023

Link Check Report

There were no links to check!

Comment thread content/docs/dvclive/api-reference/index.md
Comment thread content/docs/dvclive/api-reference/live/log_artifact.md Outdated
Copy link
Copy Markdown
Contributor

@dberenbaum dberenbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few places we should think about adding it:

  • api-reference/live#methods (this one is a blocker)
  • get-started
  • how-it-works#track-the-results

For the last one, it might be helpful to explain a bit of how to use DVC. For example:

When using Live.log_artifact("model.pt"), DVCLive will cache
the model.pt file with DVC to avoid tracking large artifacts in Git. It will
generate a model.pt.dvc metadata file, which you should track in Git.
You can retrieve the artifact from the Git commit.

@shcheklein shcheklein temporarily deployed to dvc-org-log-artifact-fzpfcrjkr March 10, 2023 09:42 Inactive
@daavoo
Copy link
Copy Markdown
Contributor Author

daavoo commented Mar 10, 2023

A few places we should think about adding it:

I have left the get-started out for now. I think will make more sense to add it there after treeverse/dvclive#465

@daavoo daavoo requested a review from dberenbaum March 10, 2023 09:43
Comment thread content/docs/dvclive/api-reference/index.md Outdated
Comment on lines +84 to +90

When using `Live.log_artifact("model.pt")`, DVCLive will
[cache](/doc/start/data-management/data-versioning) the `model.pt` file with DVC
to avoid tracking large artifacts in Git. It will generate a `model.pt.dvc`
metadata file, which you should track in Git. You can
[retrieve](/doc/start/data-management/data-versioning#retrieving) the artifact
from the Git commit.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for including my suggestion, but I think it feels a little disconnected. Feel free to drop it and we can do a follow-up PR if that's easier.

I think we should rework this whole section. Proposed text:

# Track the results

DVCLive expects each run to be tracked by Git, so it will save each run to the
same path and overwrite the results each time. Include
[`save_dvc_exp=True`](/doc/dvclive/api-reference/live#parameters) to 
auto-track in Git as a <abbr>DVC experiment</abbr>. DVC experiments
are Git commits that DVC can find but that don't clutter your Git history 
or create extra branches in your repo.

### Track artifacts

Models and data are often large and aren't easily tracked in Git. 
`Live.log_artifact("model.pt")` will [cache](/doc/start/data-management/data-versioning)
the `model.pt` file with DVC and make Git ignore it. It will generate a `model.pt.dvc`
metadata file, which can be tracked in Git and becomes part of the experiment.
You can [retrieve](/doc/start/data-management/data-versioning#retrieving) the
versioned artifact from the Git commit.

### Run experiments with `dvc exp run`

You may [run experiments](/doc/user-guide/experiment-management/running-experiments)
using DVC <abbr>pipelines</abbr>. Once you setup your pipeline, you can run it with `dvc exp run`.
This will track the inputs and outputs of your code, cache them so you never waste time repeating 
steps, and enable other features like queuing, hyperparameter tuning, and
grid searches.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shcheklein shcheklein temporarily deployed to dvc-org-log-artifact-fzpfcrjkr March 10, 2023 16:23 Inactive
@daavoo daavoo merged commit 04463c6 into main Mar 13, 2023
@daavoo daavoo deleted the log-artifact branch March 13, 2023 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C: dvclive Content of /doc/dvclive

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants