Skip to content

Commit 9af6fca

Browse files
committed
exp run: Fix --dry option.
Closes #8831
1 parent 6d80b72 commit 9af6fca

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

dvc/repo/experiments/executor/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,9 +499,9 @@ def filter_pipeline(stages):
499499
git_remote,
500500
repro_force,
501501
)
502-
info.result_hash = exp_hash
503-
info.result_ref = ref
504-
info.result_force = repro_force
502+
info.result_hash = exp_hash
503+
info.result_ref = ref
504+
info.result_force = repro_force
505505

506506
# ideally we would return stages here like a normal repro() call, but
507507
# stages is not currently picklable and cannot be returned across

tests/func/experiments/test_experiments.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,3 +748,9 @@ def test_experiment_unchanged(tmp_dir, scm, dvc, exp_stage):
748748
dvc.experiments.run(exp_stage.addressing)
749749

750750
assert len(dvc.experiments.ls()["master"]) == 2
751+
752+
753+
def test_experiment_run_dry(tmp_dir, scm, dvc, exp_stage):
754+
dvc.experiments.run(exp_stage.addressing, dry=True)
755+
756+
assert len(dvc.experiments.ls()["master"]) == 0

0 commit comments

Comments
 (0)