xnn.common.models.hub.registry.list_models#
- xnn.common.models.hub.registry.list_models(cache_dir=None, *, cached_only=False, format=None, architecture=None, tag=None, details=False)[source]#
List the pre-trained models available to load.
The registry (
models.jsonplusregister_pretrained()) is listed together with every complete model directory found in the cache, so models fetched by URL or DOI, or copied in from another machine, show up by their cache key.- Parameters:
cache_dir (str or pathlib.Path, optional) – Cache to inspect. Defaults to
default_model_cache_dir().cached_only (bool, optional) – Only models that load without a download.
format (str, optional) – Only models published in this format (
"xnn","mace-torch").architecture (str, optional) – Only this xnn architecture (
"mace","schnet", …).tag (str, optional) – Only models carrying this tag.
details (bool, optional) – Return one dict per model (name, architecture, format, cutoff, number of elements and heads, license, cache status, description) instead of the names.
- Returns:
Names (sorted), or rows when
details=True.- Return type:
Examples
>>> from xnn.common.models import list_models >>> list_models(architecture="mace")[:2] ['mace-mh-0', 'mace-mh-1']