exp run: Fix --dry option.

Closes #8831
This commit is contained in:
David de la Iglesia Castro
2023-01-17 13:32:20 +01:00
parent 6d80b72434
commit 9af6fcad4a
2 changed files with 9 additions and 3 deletions
+3 -3
View File
@@ -499,9 +499,9 @@ class BaseExecutor(ABC):
git_remote,
repro_force,
)
info.result_hash = exp_hash
info.result_ref = ref
info.result_force = repro_force
info.result_hash = exp_hash
info.result_ref = ref
info.result_force = repro_force
# ideally we would return stages here like a normal repro() call, but
# stages is not currently picklable and cannot be returned across
@@ -748,3 +748,9 @@ def test_experiment_unchanged(tmp_dir, scm, dvc, exp_stage):
dvc.experiments.run(exp_stage.addressing)
assert len(dvc.experiments.ls()["master"]) == 2
def test_experiment_run_dry(tmp_dir, scm, dvc, exp_stage):
dvc.experiments.run(exp_stage.addressing, dry=True)
assert len(dvc.experiments.ls()["master"]) == 0