Edit on GitHub


Initializes a DVCLive logger.

def init(
    path: str = None,
    resume: bool = False,
    step: int = 0,
    summary: bool = True,
    html: bool = True,


import dvclive



It's usage is optional and focused on configuring the behavior of subsequent calls to dvclive.log() and dvclive.next_step().

โš ๏ธ If path already exists when this functions is called, a cleanup will remove all existing .tsv files, {path}.json and {path.html}.


  • path (dvclive by default) - Configure where to save metrics logs and metrics summary (generated by dvclive.log() and dvclive.next_step(), respectively).
  • step (0 by default) - the step values in metrics logs files will start incrementing from this value (see dvclive.log().
  • resume - (False by default) - if True, DVCLive will try to read the previous step from the path directory and start from that point (unless a step, other than 0, is passed explicitly).
  • summary (True by default) - if True, upon each dvclive.next_step() call, DVCLive will generate a metrics summary (usable by dvc metrics). The summary will be located at {path}.json.
  • html (True by default) - works only when DVCLive is used alongside DVC. If True, upon each dvclive.next_step() call, DVC will prepare an html report with all the metrics logs logged in path. The html report will be located at {path}.html.


  • dvclive.error.DvcLiveError - If the directory path can't be created.



๐Ÿ› Found an issue? Let us know! Or fix it:

Edit on GitHub

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

Discord Chat