mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
experiments: fix checkpoints callback bug when pipeline includes data (#4678)
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user