url()

audmodel.url(uid, *, type='model', cache_root=None, verbose=False)[source]

URL to model archive or header.

Parameters
  • uid (str) – unique model ID or short ID for latest version

  • type (str) – return URL to specified type. 'model' corresponds to the archive file storing the model, 'header' to the model header, and 'meta' to the model metadata

  • 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

Return type

str

Returns

URL

Raises

Examples

>>> path = url("d4e9c65b-3.0.0")
>>> os.path.basename(path)
'd4e9c65b-3.0.0.zip'
>>> path = url("d4e9c65b-3.0.0", type="header")
>>> os.path.basename(path)
'd4e9c65b-3.0.0.header.yaml'
>>> path = url("d4e9c65b-3.0.0", type="meta")
>>> os.path.basename(path)
'd4e9c65b-3.0.0.meta.yaml'