exp: add exp remove command (#5443)

* exp: add remove function for removing specific experiment(s)

* add `dvc exp remove` command

* update tests
This commit is contained in:
Peter Rowlands (변기호)
2021-02-11 11:45:25 +09:00
committed by GitHub
parent fa550f91c3
commit 9d82739b3a
7 changed files with 153 additions and 18 deletions
+15
View File
@@ -9,6 +9,7 @@ from dvc.command.experiments import (
CmdExperimentsList,
CmdExperimentsPull,
CmdExperimentsPush,
CmdExperimentsRemove,
CmdExperimentsRun,
CmdExperimentsShow,
)
@@ -240,3 +241,17 @@ def test_experiments_pull(dvc, scm, mocker):
jobs=1,
run_cache=True,
)
def test_experiments_remove(dvc, scm, mocker):
cli_args = parse_args(["experiments", "remove", "--queue"])
assert cli_args.func == CmdExperimentsRemove
cmd = cli_args.func(cli_args)
m = mocker.patch("dvc.repo.experiments.remove.remove", return_value={})
assert cmd.run() == 0
m.assert_called_once_with(
cmd.repo, exp_names=[], queue=True,
)