MCPcopy Create free account
hub / github.com/pytorch/executorch / _fetch_image

Function _fetch_image

docs/source/custom_directives.py:46–50  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

44
45
46def _fetch_image(url):
47 path = _get_cache_path(url.encode("utf-8"), ext=".svg")
48 if not path.exists():
49 _download(url, path)
50 return os.sep + str(path.relative_to(_THIS_DIR))
51
52
53def _get_relpath(target, base):

Callers 1

runMethod · 0.85

Calls 3

_get_cache_pathFunction · 0.85
_downloadFunction · 0.85
encodeMethod · 0.45

Tested by

no test coverage detected