Describe the bug
Hello,
I am trying to load a custom encoder from a private HuggingFace model with foreign_class but am faced with the following issues.
-
It seems use_auth_token is not properly passed here:
|
hparams_local_path = fetch(hparams_file, source, savedir, use_auth_token) |
|
pymodule_local_path = fetch(pymodule_file, source, savedir, use_auth_token) |
That is because use_auth_token is the sixth parameter in fetch and as such should be called like:
fetch(hparams_file, source, savedir, use_auth_token=use_auth_token)
By changing that I was able to download the custom encoder.py and hyperparams.yaml
-
Authentication fails again while trying to fetch the model checkpoints during collect_files of the Pretrainer:
|
path = fetch( |
|
filename, source, self.collect_in, save_filename=save_filename |
|
) |
Where there seems to be no option to pass the auth token.
Expected behaviour
Passing the HuggingFace access token in foreign_class(..., use_auth_token={token}) should authenticate and download the required files.
To Reproduce
No response
Versions
speechbrain==0.5.13
Relevant log output
No response
Additional context
No response
Describe the bug
Hello,
I am trying to load a custom encoder from a private HuggingFace model with
foreign_classbut am faced with the following issues.It seems
use_auth_tokenis not properly passed here:speechbrain/speechbrain/pretrained/interfaces.py
Lines 91 to 92 in 64c8fa9
That is because
use_auth_tokenis the sixth parameter infetchand as such should be called like:By changing that I was able to download the custom encoder.py and hyperparams.yaml
Authentication fails again while trying to fetch the model checkpoints during
collect_filesof the Pretrainer:speechbrain/speechbrain/utils/parameter_transfer.py
Lines 202 to 204 in 64c8fa9
Where there seems to be no option to pass the auth token.
Expected behaviour
Passing the HuggingFace access token in
foreign_class(..., use_auth_token={token})should authenticate and download the required files.To Reproduce
No response
Versions
speechbrain==0.5.13
Relevant log output
No response
Additional context
No response