mirror of
https://github.com/saymrwulf/transformers.git
synced 2026-05-14 20:58:08 +00:00
[tokenization] do not push special file (#22657)
* do not push special file * Update src/transformers/tokenization_utils_base.py Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> --------- Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
This commit is contained in:
parent
117a0f6afa
commit
b1b3dc3e52
1 changed files with 1 additions and 0 deletions
|
|
@ -2163,6 +2163,7 @@ class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin):
|
|||
# remove private information
|
||||
if "name_or_path" in tokenizer_config:
|
||||
tokenizer_config.pop("name_or_path")
|
||||
tokenizer_config.pop("special_tokens_map_file", None)
|
||||
|
||||
with open(tokenizer_config_file, "w", encoding="utf-8") as f:
|
||||
out_str = json.dumps(tokenizer_config, indent=2, sort_keys=True, ensure_ascii=False) + "\n"
|
||||
|
|
|
|||
Loading…
Reference in a new issue