"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "b5d884d25c96069962030b9e4c9dfb4b1f2f6fa0"
Unverified Commit 50726f9e authored by Nicolas Patry's avatar Nicolas Patry Committed by GitHub
Browse files

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")`.
parent 91d7df58
...@@ -1710,7 +1710,6 @@ class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin): ...@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment