Unverified Commit b1b3dc3e authored by Arthur's avatar Arthur Committed by GitHub
Browse files

[tokenization] do not push special file (#22657)



* do not push special file

* Update src/transformers/tokenization_utils_base.py
Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>

---------
Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
parent 117a0f6a
...@@ -2163,6 +2163,7 @@ class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin): ...@@ -2163,6 +2163,7 @@ class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin):
# remove private information # remove private information
if "name_or_path" in tokenizer_config: if "name_or_path" in tokenizer_config:
tokenizer_config.pop("name_or_path") 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: 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" out_str = json.dumps(tokenizer_config, indent=2, sort_keys=True, ensure_ascii=False) + "\n"
......
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