experiments: fix checkpoints callback bug when pipeline includes data (#4678)

This commit is contained in:
Peter Rowlands (변기호)
2020-10-08 17:47:42 +09:00
committed by GitHub
parent 060fc4fbb7
commit 34804b5636
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -20,6 +20,7 @@ from dvc.path_info import PathInfo
from dvc.progress import Tqdm
from dvc.repo.experiments.executor import ExperimentExecutor, LocalExecutor
from dvc.scm.git import Git
from dvc.stage import PipelineStage
from dvc.stage.serialize import to_lockfile
from dvc.tree.repo import RepoTree
from dvc.utils import dict_sha256, env2bool, relpath
@@ -42,7 +43,8 @@ def scm_locked(f):
def hash_exp(stages):
exp_data = {}
for stage in stages:
exp_data.update(to_lockfile(stage))
if isinstance(stage, PipelineStage):
exp_data.update(to_lockfile(stage))
return dict_sha256(exp_data)
+1 -1
View File
@@ -239,11 +239,11 @@ def _reproduce_stages(
unchanged = []
# `ret` is used to add a cosmetic newline.
ret = []
checkpoint_func = kwargs.pop("checkpoint_func", None)
for stage in pipeline:
if ret:
logger.info("")
checkpoint_func = kwargs.pop("checkpoint_func", None)
if checkpoint_func:
kwargs["checkpoint_func"] = partial(
_repro_callback, checkpoint_func, unchanged