Skip to content
Edit on GitHub


Initializes a DVCLive logger.

class Live:

    def __init__(
        dir: str = "dvclive",
        resume: bool = False,
        report: Optional[str] = "auto",


from dvclive import Live

with Live() as live:


A Live() instance is required in order to log machine learning parameters, metrics and other metadata.

Live() will remove all existing DVCLive related files under dir unless resume=True.

You can use Live() as a context manager. When exiting the context manager, Live.make_summary() and Live.make_report() will be called.


  • step - See Live.next_step().

  • summary - See Live.make_summary().

  • dir - Location of the directory to store outputs.

  • metrics_file - {Live.dir}/metrics.json.

  • params_file - {Live.dir}/params.yaml.

  • plots_dir - {Live.dir}/plots.

  • report_file - {Live.dir}/report.{format}. The format can be HTML (.html) or Markdown (.md) depending on the value of the report parameter.


  • dir - Where to save DVCLive's outputs. Default: dvclive.

  • resume - If True, DVCLive will try to read the previous step from the metrics_file and start from that point. Default: False.

  • report - Any of auto, html, md or None. See Live.make_report().

    The auto mode (default) will use md format if the CI env var is present and matplotlib is installed, otherwise it will use html.

    If report is None, Live.make_report() won't generate anything.



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

Edit on GitHub

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

Discord Chat