Fixing double use_auth_token.pop (preventing private models from being visible). (#24812)
Fixing double `use_auth_token.pop` (preventing private models from being visible). Should fix: https://github.com/huggingface/transformers/issues/14334#issuecomment-1634527833 Repro: Have a private repo, with `vocab.json` (spread out files for the tokenizer) and use `AutoTokenizer.from_pretrained(..., use_auth_token="token")`.
This commit is contained in:
@@ -1710,7 +1710,6 @@ class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin):
|
|||||||
from_auto_class = kwargs.pop("_from_auto", False)
|
from_auto_class = kwargs.pop("_from_auto", False)
|
||||||
commit_hash = kwargs.pop("_commit_hash", None)
|
commit_hash = kwargs.pop("_commit_hash", None)
|
||||||
|
|
||||||
use_auth_token = kwargs.pop("use_auth_token", None)
|
|
||||||
if use_auth_token is not None:
|
if use_auth_token is not None:
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"The `use_auth_token` argument is deprecated and will be removed in v5 of Transformers.", FutureWarning
|
"The `use_auth_token` argument is deprecated and will be removed in v5 of Transformers.", FutureWarning
|
||||||
|
|||||||
Reference in New Issue
Block a user