Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dvclive/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def summary_path(self):

@property
def html_path(self):
return self.dir + ".html"
return self.dir + "_dvc_plots/index.html"

@property
def step(self):
Expand Down
11 changes: 7 additions & 4 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,24 +125,27 @@ def test_html(tmp_dir, dvc_repo, html, signal_exists, monkeypatch):
[(True, True), (True, False), (False, True), (False, False)],
)
def test_cleanup(tmp_dir, summary, html):
dvclive.init("logs", summary=summary)
logger = dvclive.init("logs", summary=summary)
dvclive.log("m1", 1)
dvclive.next_step()

html_path = tmp_dir / logger.html_path
if html:
(tmp_dir / "logs.html").touch()
html_path.parent.mkdir()
html_path.touch()

(tmp_dir / "logs" / "some_user_file.txt").touch()

assert (tmp_dir / "logs" / "m1.tsv").is_file()
assert (tmp_dir / "logs.json").is_file() == summary
assert (tmp_dir / "logs.html").is_file() == html
assert html_path.is_file() == html

dvclive.init("logs")

assert (tmp_dir / "logs" / "some_user_file.txt").is_file()
assert not (tmp_dir / "logs" / "m1.tsv").is_file()
assert not (tmp_dir / "logs.json").is_file()
assert not (tmp_dir / "logs.html").is_file()
assert not (html_path).is_file()


@pytest.mark.parametrize(
Expand Down