New Features
`artifacts` section
You can now pass metadata to [`Live.log_artifact` ](https://dvc.org/doc/dvclive/live/log_artifact) that will be written to a new `artifacts` section in the [`dvc.yaml`](https://dvc.org/doc/user-guide/project-structure/dvcyaml-files) located at `{Live.dir}/{Live.dvc_file}`.
Available metadata fields are:
py
type: Optional[str] = None,
name: Optional[str] = None,
desc: Optional[str] = None,
labels: Optional[List[str]] = None,
meta: Optional[Dict[str, Any]] = None,
When passing `type="model"`, the artifact will be identified by [Studio](https://studio.iterative.ai/) and automatically included in the [Studio Model Registry](https://dvc.org/doc/studio/user-guide/model-registry/).
- Example
py
from pathlib import Path
from dvclive import Live
Path("model.pth").write_text("foo")
with Live(save_dvc_exp=True) as live:
live.log_artifact(
"model.pth",
type="model",
name="mymodel",
desc="Finetuned ResNet50",
)
yaml
dvclive/dvc.yaml
artifacts:
mymodel:
path: ../model.pth
type: model
desc: Finetuned ResNet50
Auto-initialization of DVC Repo
When inside a non-empty Git Repository, DVCLive will auto-initialize a DVC Repository when needed.
What's Changed
* Add DVCLive-Quickstart by daavoo in https://github.com/iterative/dvclive/pull/530
* studio: Support `DVC_` env vars. by daavoo in https://github.com/iterative/dvclive/pull/533
* Support `artifacts` section by daavoo in https://github.com/iterative/dvclive/pull/521
* feat(sklplots): add confusion matrix normalized option by shcheklein in https://github.com/iterative/dvclive/pull/538
* revert get_dvc_stage_template by dberenbaum in https://github.com/iterative/dvclive/pull/540
* Auto-initialize DVC repo by dberenbaum in https://github.com/iterative/dvclive/pull/539
New Contributors
* dependabot made their first contribution in https://github.com/iterative/dvclive/pull/503
**Full Changelog**: https://github.com/iterative/dvclive/compare/2.6.4...2.7.0