exp show: pcp: Allow to --drop Experiment

This commit is contained in:
David de la Iglesia Castro
2022-04-04 11:48:55 +02:00
parent bfb1b74923
commit 117b22d58a
2 changed files with 10 additions and 5 deletions
+6 -5
View File
@@ -426,11 +426,12 @@ def show_experiments(
subset=subset,
)
td.drop_duplicates("rows", subset=subset)
td.column("Experiment")[:] = [
# remove tree characters
str(x).encode("ascii", "ignore").strip().decode()
for x in td.column("Experiment")
]
if "Experiment" in td:
td.column("Experiment")[:] = [
# remove tree characters
str(x).encode("ascii", "ignore").strip().decode()
for x in td.column("Experiment")
]
out = kwargs.get("out") or "dvc_plots"
output_file = os.path.join(out, "index.html")
ui.write(
+4
View File
@@ -621,6 +621,10 @@ def test_show_parallel_coordinates(tmp_dir, dvc, scm, mocker, capsys):
assert '"label": "Created"' not in html_text
assert '"label": "foobar"' not in html_text
assert main(["exp", "show", "--pcp", "--drop", "Experiment"]) == 0
html_text = (tmp_dir / "dvc_plots" / "index.html").read_text()
assert '"label": "Experiment"' not in html_text
def test_show_outs(tmp_dir, dvc, scm):
tmp_dir.gen("copy.py", COPY_SCRIPT)