xnn.common.models.hub.cache.default_model_cache_dir#

xnn.common.models.hub.cache.default_model_cache_dir()[source]#

Return the directory models are cached in when no cache_dir is given.

The XNN_MODELS environment variable wins, then XNN_CACHE (models go to its models/ subfolder, beside the datasets), then the repository’s models/ directory in a source checkout, mirroring datasets/. An installed package falls back to ~/.cache/xnn/models.

Returns:

The cache directory (not created here).

Return type:

pathlib.Path