uid()

audmodel.uid(name, params, version=None, *, subgroup=None)[source]

Unique model ID.

Parameters
  • name (str) – model name

  • params (dict[str, object]) – dictionary with parameters

  • version (Optional[str]) – version string, if not given the short ID is returned

  • subgroup (Optional[str]) – extend group ID to com.audeering.models.<subgroup>. You can increase the depth by using dot-notation, e.g. setting subgroup=foo.bar will result in com.audeering.models.foo.bar

Return type

str

Returns

unique or short model ID

Examples

>>> uid(
...     "torch",
...     {
...         "model": "cnn10",
...         "data": "emodb",
...         "feature": "melspec",
...         "sampling_rate": 16000,
...     },
...     subgroup="audmodel.dummy.cnn",
... )
'd4e9c65b'
>>> uid(
...     "torch",
...     {
...         "model": "cnn10",
...         "data": "emodb",
...         "feature": "melspec",
...         "sampling_rate": 16000,
...     },
...     version="3.0.0",
...     subgroup="audmodel.dummy.cnn",
... )
'd4e9c65b-3.0.0'