pub fn hf_cache_root(
environment: &HashMap<String, String>,
home: &Path,
) -> PathBufExpand description
The machine’s Hugging Face hub cache: $HF_HUB_CACHE, else $HF_HOME/hub,
else ~/.cache/huggingface/hub.
There is exactly one, because that is the rule the hub’s own tooling
follows: the environment says where the cache is, replacing the default
rather than adding to it. A cache elsewhere that should also be swept is a
setting (hf_cache_roots), not an environment variable, so what a pull
writes and what discovery reads can never come apart.