Skip to content
Edit on GitHub

PyTorch Lightning

DVCLive allows you to add experiment tracking capabilities to your PyTorch Lightning projects.


Pass the DVCLiveLogger to your Trainer:

from dvclive.lightning import DVCLiveLogger

dvclive_logger = DVCLiveLogger()

trainer = Trainer(logger=dvclive_logger)

Each metric will be logged to:



  • {Live.plots_dir} is defined in Live.
  • {split} can be either train or eval.
  • {iter_type} can be either epoch or step.
  • {metric} is the name provided by the framework.


  • 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 used to instantiate a new Live instance. If experiment is used, the arguments are ignored.


  • Using **kwargs to customize Live.
from dvclive.lightning import DVCLiveLogger

trainer = Trainer(

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


🐛 Found an issue? Let us know! Or fix it:

Edit on GitHub

Have a question? Join our chat, we will help you:

Discord Chat