DVCLive Experiments
Can be enabled by passing `save_dvc_exp=True`.
python
foo.py
import random
from dvclive import Live
with Live(save_dvc_exp=True) as live:
live.log_param("fooparam", random.random())
for i in range(4):
live.log_metric("foo", i * random.random())
live.next_step()
When inside a [`DVC` repository](https://dvc.org/doc/command-reference/init) and `DVC` is available as a Python library, DVCLive will create a new [DVC experiment ](https://dvc.org/doc/start/experiment-management/experiments) as part of `live.end` (called on exit of context manager and inside the integrations with ML frameworks).
console
$ python foo.py
$ dvc exp show
─────────────────────────────────────────────────────────────────
Experiment Created foo step fooparam
─────────────────────────────────────────────────────────────────
workspace - 0.56773 4 0.20543
master 03:45 PM - - -
└── fbed990 [rowdy-vase] 07:25 PM 0.56773 4 0.20543
─────────────────────────────────────────────────────────────────
$ python foo.py
$ dvc exp show
─────────────────────────────────────────────────────────────────
Experiment Created foo step fooparam
─────────────────────────────────────────────────────────────────
workspace - 2.2236 4 0.65216
master 03:45 PM - - -
├── 4ec327f [shock-weka] 07:25 PM 2.2236 4 0.65216
└── fbed990 [rowdy-vase] 07:25 PM 0.56773 4 0.20543
─────────────────────────────────────────────────────────────────
What's Changed
* Create `DVC` experiment on `live.end`. by daavoo in https://github.com/iterative/dvclive/pull/366
* fast.ai: Handle resuming. by daavoo in https://github.com/iterative/dvclive/pull/379
**Full Changelog**: https://github.com/iterative/dvclive/compare/1.0.3...1.1.0