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

Function _get_cache_path

docs/source/custom_directives.py:32–36  ·  view source on GitHub ↗
(key, ext)

Source from the content-addressed store, hash-verified

30
31
32def _get_cache_path(key, ext):
33 filename = f"{hashlib.sha256(key).hexdigest()}{ext}"
34 cache_dir = _THIS_DIR / "gen_images"
35 cache_dir.mkdir(parents=True, exist_ok=True)
36 return cache_dir / filename
37
38
39def _download(url, path):

Callers 1

_fetch_imageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected