mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-08 23:09:48 +01:00
* experiments: add initial experiments.show * only includes metrics + params (no code/data information) * experiments: basic `dvc experiments show` functionality * experiments: clone and run repro inside clone workspace * repro: add -e/--experiment option * experiments: hash experiments to identify duplicates * experiments: update show * experiments: checkout experiment after running repro * experiments: add `dvc experiments checkout` * experiments: add simple `dvc experiments diff` command * just shows combined output from `metrics diff` and `plots diff` for now * add very simple tests * add some useful output messages * experiments: suppress help messages while feature is in development * experiment related commands will be accessible but hidden from the default command help messages * add simple experiments command tests * experiments: disable feature by default * experiments only enabled in test environment (DVC_TEST) or when core.experiments config option is true * use fetch on checkout missing revs
35 lines
959 B
Python
35 lines
959 B
Python
from dvc.cli import parse_args
|
|
from dvc.command.repro import CmdRepro
|
|
from dvc.dvcfile import PIPELINE_FILE
|
|
|
|
default_arguments = {
|
|
"all_pipelines": False,
|
|
"downstream": False,
|
|
"dry": False,
|
|
"force": False,
|
|
"run_cache": True,
|
|
"interactive": False,
|
|
"no_commit": False,
|
|
"pipeline": False,
|
|
"single_item": False,
|
|
"recursive": False,
|
|
"force_downstream": False,
|
|
"experiment": False,
|
|
}
|
|
|
|
|
|
def test_default_arguments(dvc, mocker):
|
|
cmd = CmdRepro(parse_args(["repro"]))
|
|
mocker.patch.object(cmd.repo, "reproduce")
|
|
cmd.run()
|
|
cmd.repo.reproduce.assert_called_with(PIPELINE_FILE, **default_arguments)
|
|
|
|
|
|
def test_downstream(dvc, mocker):
|
|
cmd = CmdRepro(parse_args(["repro", "--downstream"]))
|
|
mocker.patch.object(cmd.repo, "reproduce")
|
|
cmd.run()
|
|
arguments = default_arguments.copy()
|
|
arguments.update({"downstream": True})
|
|
cmd.repo.reproduce.assert_called_with(PIPELINE_FILE, **arguments)
|