load()¶
- audmodel.load(uid, *, cache_root=None, verbose=False)[source]¶
Download a model by its unique ID.
If
root
is not set, the model is downloaded to the default cache folder, seeaudmodel.default_cache_root()
. If the model already exists in the cache folder, the download is skipped.- Parameters
uid (
str
) – unique model ID or short ID for latest versioncache_root (
Optional
[str
]) – cache folder where models and headers are stored. If not setaudmodel.default_cache_root()
is usedverbose (
bool
) – show debug messages
- Return type
- Returns
path to model folder
- Raises
audbackend.BackendError – if connection to repository on backend cannot be established
RuntimeError – if model does not exist
Examples
>>> root = load("d4e9c65b-3.0.0") >>> "/".join(root.split(os.path.sep)[-2:]) 'd4e9c65b/3.0.0'