diff --git a/src/transformers/modeling_albert.py b/src/transformers/modeling_albert.py index f50ce673f276d6..2f52d1f498544b 100644 --- a/src/transformers/modeling_albert.py +++ b/src/transformers/modeling_albert.py @@ -823,7 +823,7 @@ def forward( if "masked_lm_labels" in kwargs: warnings.warn( "The `masked_lm_labels` argument is deprecated and will be removed in a future version, use `labels` instead.", - DeprecationWarning, + FutureWarning, ) labels = kwargs.pop("masked_lm_labels") assert kwargs == {}, f"Unexpected keyword arguments: {list(kwargs.keys())}." diff --git a/src/transformers/tokenization_utils_base.py b/src/transformers/tokenization_utils_base.py index 63d1351b0808ac..6b424606f7ff2e 100644 --- a/src/transformers/tokenization_utils_base.py +++ b/src/transformers/tokenization_utils_base.py @@ -1466,7 +1466,7 @@ def _get_padding_truncation_strategies( "use `padding='max_length'` to pad to a max length. In this case, you can give a specific " "length with `max_length` (e.g. `max_length=45`) or leave max_length to None to pad to the " "maximal input size of the model (e.g. 512 for Bert).", - DeprecationWarning, + FutureWarning, ) if max_length is None: padding_strategy = PaddingStrategy.LONGEST @@ -1492,7 +1492,7 @@ def _get_padding_truncation_strategies( "`truncation='only_first'` (will only truncate the first sentence in the pairs) " "`truncation='only_second'` (will only truncate the second sentence in the pairs) " "or `truncation='longest_first'` (will iteratively remove tokens from the longest sentence in the pairs).", - DeprecationWarning, + FutureWarning, ) truncation_strategy = TruncationStrategy(old_truncation_strategy) elif truncation is not False: