Skip to content

Commit db2db45

Browse files
Rename FetchConfig.use_auth_token to token and pass token to HF hub (#2996)
Co-authored-by: Peter Plantinga <plantinga.peter@protonmail.com>
1 parent c3b5fce commit db2db45

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

speechbrain/utils/fetching.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ class FetchConfig:
232232
allow_network : bool, defaults to `True`
233233
If `True`, network accesses are allowed. If `False`, then remote URLs
234234
or HF won't be fetched, regardless of any other parameter.
235-
use_auth_token : bool, defaults to `False`
236-
If `True`, use HuggingFace's `auth_token` to enable loading private
235+
token : bool, defaults to `False`
236+
If `True`, use HuggingFace's `token` to enable loading private
237237
models from the Hub.
238238
revision : Optional[str] defaults to `None`
239239
HuggingFace Hub model revision (Git branch name/tag/commit hash) to pin
@@ -251,7 +251,7 @@ class FetchConfig:
251251
overwrite: bool = False
252252
allow_updates: bool = False
253253
allow_network: bool = True
254-
use_auth_token: bool = False
254+
token: bool = False
255255
revision: str = None
256256
huggingface_cache_dir: str = None
257257

@@ -410,7 +410,7 @@ def fetch(
410410
hf_kwargs = {
411411
"repo_id": source,
412412
"filename": filename,
413-
"use_auth_token": fetch_config.use_auth_token,
413+
"token": fetch_config.token,
414414
"revision": fetch_config.revision,
415415
"local_files_only": not fetch_config.allow_network,
416416
}

0 commit comments

Comments
 (0)