xnn.common.models.hub.registry#

The registry of pre-trained models and list_models().

The models xnn knows about are listed in models.json, shipped inside the package: xnn-trained models and the MACE and AIMNet2 foundation models alike, one ModelCard each. register_pretrained() adds more at run time (a lab’s own Zenodo uploads, say). list_models() shows the registry together with whatever else sits in the cache, so a model directory copied in by hand is listed and loadable by its name.

Functions

get_card(name)

The registered card for name (a model name or an alias), or None.

list_models([cache_dir, cached_only, ...])

List the pre-trained models available to load.

model_card(name[, cache_dir])

Return the card of a registered or cached model.

register_pretrained([card])

Add a model to the registry (for this process).

registered_cards([format])

The registered cards, sorted by name, optionally of one format.