DVCLive allows you to add experiment tracking capabilities to your PyTorch Lightning projects.
To start using DVCLive, add a few lines to your training code in any PyTorch Lightning project.
Pass the
DvcLiveLogger
to your
Trainer
:
+from dvclive.lightning import DvcLiveLogger
. . .
dvclive_logger = DvcLiveLogger()
trainer = Trainer(
+ logger=dvclive_logger,
)
trainer.fit(model)
This will generate the outputs as described in the Get Started.
Without requiring additional modifications to your training code, you can use DVCLive alongside DVC. See DVCLive with DVC for more info.
run_name
- (None
by default) - Name of the run, used in PyTorch Lightning
to get version.
prefix
- (None
by default) - string that adds to each metric name.
experiment
- (None
by default) -
Live
object to be used instead of
initializing a new one.
**kwargs
- Any additional arguments will be passed to
Live
.
**kwargs
to customize Live
.from dvclive.lightning import DvcLiveLogger
dvclive_logger = DvcLiveLogger(
path='my_logs_path'
)
trainer = Trainer(
logger=dvclive_logger,
)
trainer.fit(model)
By default, PyTorch Lightning creates a directory to store checkpoints using the
logger's name (DvcLiveLogger
). You can change the checkpoint path or disable
checkpointing at all as described in the
PyTorch Lightning documentation