def _get(stage, p, info, cache, metric, persist=False): parsed = urlparse(p) if parsed.scheme == "remote": remote = Remote(stage.repo, name=parsed.netloc) return OUTS_MAP[remote.scheme]( stage, p, info, cache=cache, remote=remote, metric=metric, persist=persist, ) for o in OUTS: if o.supported(p): return o( stage, p, info, cache=cache, remote=None, metric=metric, persist=persist, ) return LocalOutput( stage, p, info, cache=cache, remote=None, metric=metric, persist=persist, )
def _get( stage, p, info=None, cache=True, metric=False, plot=False, persist=False, checkpoint=False, desc=None, isexec=False, ): parsed = urlparse(p) if parsed.scheme == "remote": tree = get_cloud_tree(stage.repo, name=parsed.netloc) return OUTS_MAP[tree.scheme]( stage, p, info, cache=cache, tree=tree, metric=metric, plot=plot, persist=persist, checkpoint=checkpoint, desc=desc, isexec=isexec, ) for o in OUTS: if o.supported(p): return o( stage, p, info, cache=cache, tree=None, metric=metric, plot=plot, persist=persist, checkpoint=checkpoint, desc=desc, isexec=isexec, ) return LocalOutput( stage, p, info, cache=cache, tree=None, metric=metric, plot=plot, persist=persist, checkpoint=checkpoint, desc=desc, isexec=isexec, )