MCPcopy Create free account
hub / github.com/HA-Transformer/MAT / cached_path

Function cached_path

fairseq/file_utils.py:134–161  ·  view source on GitHub ↗

Given something that might be a URL (or might be a local path), determine which. If it's a URL, download the file and cache it, and return the path to the cached file. If it's already a local path, make sure the file exists and then return the path.

(url_or_filename, cache_dir=None)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

load_archive_fileFunction · 0.85

Calls 2

get_from_cacheFunction · 0.85
existsMethod · 0.45

Tested by

no test coverage detected