diff --git a/dvc/repo/live.py b/dvc/repo/live.py index f53007e89..9a7521395 100644 --- a/dvc/repo/live.py +++ b/dvc/repo/live.py @@ -1,5 +1,4 @@ import logging -import os from typing import TYPE_CHECKING, List, Optional from dvc.render.utils import render @@ -19,10 +18,7 @@ def create_summary(out): html_path = out.path_info.fspath + "_dvc_plots" - index_path = render( - out.repo, plots, metrics=metrics, path=html_path, refresh_seconds=5 - ) - logger.info(f"\nfile://{os.path.abspath(index_path)}") + render(out.repo, plots, metrics=metrics, path=html_path, refresh_seconds=5) def summary_path_info(out: "Output") -> Optional["PathInfo"]: diff --git a/dvc/stage/monitor.py b/dvc/stage/monitor.py index 9461c6022..03b05dab9 100644 --- a/dvc/stage/monitor.py +++ b/dvc/stage/monitor.py @@ -9,6 +9,7 @@ from typing import TYPE_CHECKING, Callable, List from dvc.repo.live import create_summary from dvc.stage.decorators import relock_repo from dvc.stage.exceptions import StageCmdFailedError +from dvc.ui import ui if TYPE_CHECKING: from dvc.output import Output @@ -86,11 +87,16 @@ class LiveTask(MonitorTask): error_cls = LiveKilledError def __init__(self, stage: "Stage", out: "Output", proc: subprocess.Popen): + self.output_path = os.path.join( + os.getcwd(), out.path_info.fspath + "_dvc_plots", "index.html" + ) + ui.write(f"Live summary will be created at:\n{self.output_path}") super().__init__(stage, functools.partial(create_summary, out), proc) def after_run(self): # make sure summary is prepared for all the data self.execute() + ui.write(f"Live summary has been created at:\n{self.output_path}") class Monitor: