diff --git a/src/transformers/tokenization_utils_base.py b/src/transformers/tokenization_utils_base.py index b936adc36bb6..40dc51b80d2c 100644 --- a/src/transformers/tokenization_utils_base.py +++ b/src/transformers/tokenization_utils_base.py @@ -101,6 +101,9 @@ def __init__( def __getstate__(self): return self.__dict__ + def __str__(self): + return self.content + @dataclass class EncodingFast: """This is dummy class because without the `tokenizers` library we don't have these objects anyway"""