huggingface_hub.hf_hub_download supports passing a revision parameter to hf_hub_{url|download} to load a specific version (understand: commit, tag, or branch head) of models hosted on Huggingface Hub:
from huggingface_hub import hf_hub_download
hf_hub_url(repo_id, filename, revision=..., ...)
It would be nice to expose this revision parameter in speechbrain so that one can pin a model to a specific version (and ensure that a given code will still behave the same even if the model is updated upstream).
The API could look like this:
from speechbrain.pretrained import EncoderClassifier
encoder = EncoderClassifier.from_hparams(
source="speechbrain/spkrec-ecapa-voxceleb",
revision="5c0be3875fda05e81f3c004ed8c7c06be308de1e",
)
or maybe like this that @julien-c implemented for pyannote.audio:
from speechbrain.pretrained import EncoderClassifier
encoder = EncoderClassifier.from_hparams(
source="speechbrain/spkrec-ecapa-voxceleb@5c0be3875fda05e81f3c004ed8c7c06be308de1e")
huggingface_hub.hf_hub_downloadsupports passing arevisionparameter tohf_hub_{url|download}to load a specific version (understand: commit, tag, or branch head) of models hosted on Huggingface Hub:It would be nice to expose this
revisionparameter inspeechbrainso that one can pin a model to a specific version (and ensure that a given code will still behave the same even if the model is updated upstream).The API could look like this:
or maybe like this that @julien-c implemented for
pyannote.audio: