From 16da87713973203333d6b7bf78bfb7b8ecba9c34 Mon Sep 17 00:00:00 2001 From: Evan Pete Walsh Date: Wed, 21 Oct 2020 10:57:44 -0700 Subject: [PATCH] fix 'encode_plus' docstring for 'special_tokens_mask' (0s and 1s were reversed) (#7949) * fix docstring for 'special_tokens_mask' * revert auto formatter changes * revert another auto format * revert another auto format --- src/transformers/tokenization_utils_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transformers/tokenization_utils_base.py b/src/transformers/tokenization_utils_base.py index 2ec3614bd2..4b78206c44 100644 --- a/src/transformers/tokenization_utils_base.py +++ b/src/transformers/tokenization_utils_base.py @@ -1191,7 +1191,7 @@ ENCODE_PLUS_ADDITIONAL_KWARGS_DOCSTRING = r""" :obj:`return_overflowing_tokens=True`). - **num_truncated_tokens** -- Number of tokens truncated (when a :obj:`max_length` is specified and :obj:`return_overflowing_tokens=True`). - - **special_tokens_mask** -- List of 0s and 1s, with 0 specifying added special tokens and 1 specifying + - **special_tokens_mask** -- List of 0s and 1s, with 1 specifying added special tokens and 0 specifying regular sequence tokens (when :obj:`add_special_tokens=True` and :obj:`return_special_tokens_mask=True`). - **length** -- The length of the inputs (when :obj:`return_length=True`) """