runner.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:nekpy 作者: NekBox 项目源码 文件源码
def run_all(values, base, get=get_proc, num_workers = 4):
    full_dask = toolz.merge(val.dask for val in values)
    full_keys = [val._key for val in values]

    cache = {}
    if exists("{}.cache".format(base["prefix"])):
        with open("{}.cache".format(base["prefix"]), "r") as f:
            cache = json.load(f)

    full_dask.update(cache)

    with ProgressBar(), NekCallback(base) as rprof:
        res = get(full_dask, full_keys, cache=cache, num_workers=num_workers, optimize_graph=False)

    return res
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号