Breaking changes
- Changes to the structure of the output directory and where methods write to 322
| Method | Before | Now
| -------------- | ----------------------| ----------------------- |
live.log_image | `dvclive/images` | `dvclive/plots/images` |
live.log_metric | `dvclive/scalars` | `dvclive/plots/metrics` |
live.log_sklearn_plot | `dvclive/plots` | `dvclive/plots/sklearn` |
live.make_summary | `dvclive.json` | `dvclive/summary.json` |
- `live.log` renamed to `live.log_metric` 343
- `live.log_plot` renamed to `live.log_sklearn_plot` 322
- Removed `live.get_step()` and `live.set_step()` in favor of `live.step` property. 357
- `live.log_image` No longer creates step subfolder. Instead overrides the previous step 331
The subfolder structure can be still manually created:
py
for i in range(2):
live.log_image(f"{live.step}/img.png", img)
- `live.log_metric` No longer calls `live.make_summary` 353
- `live.log_sklearn_plot` No longer raises error on `step` logging. Instead overrides previous step.
- Dropped support for `live` section in `dvc.yaml` 337
New Features
- `Live` can now be used as a context manager 354
py
with Live() as live:
live.log_metric("foo", 0.1)
- New `Live.summary` can be used to add metrics directly to the summary 354
py
with Live() as live:
for epoch in range(EPOCHS):
live.log_metric("loss", 0.1)
live.summary["additional_metric"] = 1.0
- Option to provide custom name for `Live.log_sklearn_plot`
py
live.log_sklearn_plot("confusion_matrix", y_true, y_pred, name="train/cm")
**Full Changelog**: https://github.com/iterative/dvclive/compare/0.12.1...1.0