Skip to content

Commit 11fdd34

Browse files
authored
Updated html_path (#153)
1 parent fe95917 commit 11fdd34

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

dvclive/metrics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def summary_path(self):
9898

9999
@property
100100
def html_path(self):
101-
return self.dir + ".html"
101+
return self.dir + "_dvc_plots/index.html"
102102

103103
@property
104104
def step(self):

tests/test_main.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,24 +125,27 @@ def test_html(tmp_dir, dvc_repo, html, signal_exists, monkeypatch):
125125
[(True, True), (True, False), (False, True), (False, False)],
126126
)
127127
def test_cleanup(tmp_dir, summary, html):
128-
dvclive.init("logs", summary=summary)
128+
logger = dvclive.init("logs", summary=summary)
129129
dvclive.log("m1", 1)
130130
dvclive.next_step()
131+
132+
html_path = tmp_dir / logger.html_path
131133
if html:
132-
(tmp_dir / "logs.html").touch()
134+
html_path.parent.mkdir()
135+
html_path.touch()
133136

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

136139
assert (tmp_dir / "logs" / "m1.tsv").is_file()
137140
assert (tmp_dir / "logs.json").is_file() == summary
138-
assert (tmp_dir / "logs.html").is_file() == html
141+
assert html_path.is_file() == html
139142

140143
dvclive.init("logs")
141144

142145
assert (tmp_dir / "logs" / "some_user_file.txt").is_file()
143146
assert not (tmp_dir / "logs" / "m1.tsv").is_file()
144147
assert not (tmp_dir / "logs.json").is_file()
145-
assert not (tmp_dir / "logs.html").is_file()
148+
assert not (html_path).is_file()
146149

147150

148151
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)