xnn.common.models.hub.registry.model_card#

xnn.common.models.hub.registry.model_card(name, cache_dir=None)[source]#

Return the card of a registered or cached model.

Parameters:
  • name (str) – Registry name, alias, or cache key.

  • cache_dir (str or pathlib.Path, optional) – Cache to look in for models that are not registered.

Returns:

The card (the cached copy’s for a model that is only cached).

Return type:

ModelCard

Raises:

KeyError – If the model is neither registered nor cached.