






"""simple docstring"""



import unittest
import warnings
from dataclasses import dataclass

from transformers.convert_slow_tokenizer import SpmConverter
from transformers.testing_utils import get_tests_dir




@dataclass
class 							__lowercase:
						lowerCAmelCase_		:				str




class 							__lowercase(							unittest.TestCase	):






						def 		lowerCAmelCase (       self)      ->	List[Any]:




											"""simple docstring"""





											lowerCamelCase__					=get_tests_dir('fixtures/test_sentencepiece.model')
											lowerCamelCase__					=get_tests_dir('fixtures/test_sentencepiece_with_bytefallback.model')

											lowerCamelCase__					=FakeOriginalTokenizer(vocab_file=_SCREAMING_SNAKE_CASE)

											with warnings.catch_warnings(record=_SCREAMING_SNAKE_CASE) as w:
																lowerCamelCase__					=SpmConverter(_SCREAMING_SNAKE_CASE)
											self.assertEqual(len(_SCREAMING_SNAKE_CASE)     ,    0)

											lowerCamelCase__					=FakeOriginalTokenizer(vocab_file=_SCREAMING_SNAKE_CASE)

											with warnings.catch_warnings(record=_SCREAMING_SNAKE_CASE) as w:
																lowerCamelCase__					=SpmConverter(_SCREAMING_SNAKE_CASE)
											self.assertEqual(len(_SCREAMING_SNAKE_CASE)     ,    1)

											self.assertIn(
											    'The sentencepiece tokenizer that you are converting to a fast tokenizer uses the byte fallback option'
											    ' which is not implemented in the fast tokenizers.'     ,    str(w[0].message)     ,    )







"""simple docstring"""



import warnings

from ...utils import logging
from .image_processing_vit import ViTImageProcessor


_snake_case							:   Tuple	  =       logging.get_logger(__name__)




class 							__lowercase(							_UpperCamelCase	):






						def __init__(       self     ,    *_SCREAMING_SNAKE_CASE     ,    **_SCREAMING_SNAKE_CASE)      ->	None:




											"""simple docstring"""





											warnings.warn(
											    'The class ViTFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please'
											    ' use ViTImageProcessor instead.'     ,    _SCREAMING_SNAKE_CASE     ,    )
											super().__init__(*_SCREAMING_SNAKE_CASE     ,    **_SCREAMING_SNAKE_CASE)