Skip to content

Commit

Permalink
exp run: pass recursive args to checkout (iterative#6458)
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry authored Aug 18, 2021
1 parent 82e559a commit 4b9a411
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions dvc/repo/experiments/executor/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ def filter_pipeline(stages):
quiet=True,
allow_missing=True,
checkpoint_reset=checkpoint_reset,
recursive=kwargs.get("recursive", False),
)

checkpoint_func = partial(
Expand Down
11 changes: 10 additions & 1 deletion tests/func/experiments/test_experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from dvc.dvcfile import PIPELINE_FILE
from dvc.repo.experiments.utils import exp_refs_by_rev
from dvc.utils.serialize import PythonFileCorruptedError
from dvc.utils.serialize import PythonFileCorruptedError, load_yaml
from tests.func.test_repro_multistage import COPY_SCRIPT


Expand Down Expand Up @@ -657,3 +657,12 @@ def test_modified_data_dep(tmp_dir, scm, dvc, workspace, params, target):
if workspace:
assert (tmp_dir / "metrics.yaml").read_text().strip() == params
assert (tmp_dir / "data").read_text().strip() == "modified"


def test_exp_run_recursive(tmp_dir, scm, dvc, run_copy_metrics):
tmp_dir.dvc_gen("metric_t.json", "foo: 1")
run_copy_metrics(
"metric_t.json", "metric.json", metrics=["metric.json"], no_exec=True
)
assert dvc.experiments.run(".", recursive=True)
assert load_yaml(tmp_dir / "metric.json") == {"foo": 1}

0 comments on commit 4b9a411

Please sign in to comment.