示例#1
0
 def hash_exp(stages: Iterable["PipelineStage"]) -> str:
     exp_data = {}
     for stage in stages:
         if isinstance(stage, PipelineStage):
             exp_data.update(to_lockfile(stage))
     return dict_sha256(exp_data)
示例#2
0
文件: cache.py 项目: nealgoyal/dvc
def _get_cache_hash(cache, key=False):
    if key:
        cache["outs"] = [out["path"] for out in cache.get("outs", [])]
    return dict_sha256(cache)
示例#3
0
def test_dict_sha256(d, sha):
    assert dict_sha256(d) == sha
示例#4
0
def hash_exp(stages):
    exp_data = {}
    for stage in stages:
        exp_data.update(to_lockfile(stage))
    return dict_sha256(exp_data)
示例#5
0
文件: cache.py 项目: Suor/dvc
def _get_cache_hash(cache, key=False):
    from dvc.objects.meta import Meta

    if key:
        cache["outs"] = [out["path"] for out in cache.get("outs", [])]
    return dict_sha256(cache, exclude=[Meta.PARAM_SIZE, Meta.PARAM_NFILES])