plots: add dvc plots -e/--experiment option (#4488)

* plots: add -e/--experiment option for plots diff

* experiments: add method to get baseline for a given experiment

* plots: default to diff against baseline instead of workspace/head for experiments

* use exact match for experiments RE since name-rev may return relative
commits
This commit is contained in:
Peter Rowlands (변기호)
2020-08-29 00:57:28 +03:00
committed by GitHub
parent be2e0778b4
commit d6bb4341dd
8 changed files with 109 additions and 17 deletions
+4 -2
View File
@@ -2,7 +2,7 @@ from dvc.cli import parse_args
from dvc.command.plots import CmdPlotsDiff, CmdPlotsShow
def test_metrics_diff(dvc, mocker):
def test_plots_diff(dvc, mocker):
cli_args = parse_args(
[
"plots",
@@ -24,6 +24,7 @@ def test_metrics_diff(dvc, mocker):
"x_title",
"--y-label",
"y_title",
"--experiment",
"HEAD",
"tag1",
"tag2",
@@ -50,10 +51,11 @@ def test_metrics_diff(dvc, mocker):
"x_label": "x_title",
"y_label": "y_title",
},
experiment=True,
)
def test_metrics_show(dvc, mocker):
def test_plots_show(dvc, mocker):
cli_args = parse_args(
[
"plots",