set_alias()

audmodel.set_alias(alias, uid, *, cache_root=None, verbose=False)[source]

Set or update an alias for a model.

Parameters
  • alias (str) – alias name

  • uid (str) – unique model ID (omit version for latest version)

  • cache_root (Optional[str]) – cache folder where models and headers are stored. If not set audmodel.default_cache_root() is used

  • verbose (bool) – show debug messages

Raises
  • audbackend.BackendError – if connection to repository on backend cannot be established

  • RuntimeError – if model does not exist

  • ValueError – if alias can be confused with an UID, or it does contain chars other than [A-Za-z0-9._-]+

Examples

>>> set_alias("my-model", "d4e9c65b-3.0.0")