



"""simple docstring"""






import argparse
import collections
import os
import re
import tempfile

import pandas as pd
from datasets import Dataset
from huggingface_hub import hf_hub_download, upload_folder

from transformers.utils import direct_transformers_import


# All paths are set with the intent you should run this script from the root of the repo with the command
# python utils/update_metadata.py
__snake_case							:     List[Any]   =					'src/transformers'


# This is to make sure the transformers module imported is the one in the repo.
__snake_case							:     Optional[int]   =					direct_transformers_import(TRANSFORMERS_PATH)


# Regexes that match TF/Flax/PT model names.
__snake_case							:     int   =					re.compile(R'TF(.*)(?:Model|Encoder|Decoder|ForConditionalGeneration)')
__snake_case							:     Any   =					re.compile(R'Flax(.*)(?:Model|Encoder|Decoder|ForConditionalGeneration)')
# Will match any TF or Flax model too so need to be in an else branch afterthe two previous regexes.
__snake_case							:     Dict   =					re.compile(R'(.*)(?:Model|Encoder|Decoder|ForConditionalGeneration)')


# Fill this with tuples (pipeline_tag, model_mapping, auto_model)
__snake_case							:     Tuple   =					[
    ('pretraining', 'MODEL_FOR_PRETRAINING_MAPPING_NAMES', 'AutoModelForPreTraining'),
    ('feature-extraction', 'MODEL_MAPPING_NAMES', 'AutoModel'),
    ('audio-classification', 'MODEL_FOR_AUDIO_CLASSIFICATION_MAPPING_NAMES', 'AutoModelForAudioClassification'),
    ('text-generation', 'MODEL_FOR_CAUSAL_LM_MAPPING_NAMES', 'AutoModelForCausalLM'),
    ('automatic-speech-recognition', 'MODEL_FOR_CTC_MAPPING_NAMES', 'AutoModelForCTC'),
    ('image-classification', 'MODEL_FOR_IMAGE_CLASSIFICATION_MAPPING_NAMES', 'AutoModelForImageClassification'),
    ('image-segmentation', 'MODEL_FOR_IMAGE_SEGMENTATION_MAPPING_NAMES', 'AutoModelForImageSegmentation'),
    ('fill-mask', 'MODEL_FOR_MASKED_LM_MAPPING_NAMES', 'AutoModelForMaskedLM'),
    ('object-detection', 'MODEL_FOR_OBJECT_DETECTION_MAPPING_NAMES', 'AutoModelForObjectDetection'),
    (
        'zero-shot-object-detection',
        'MODEL_FOR_ZERO_SHOT_OBJECT_DETECTION_MAPPING_NAMES',
        'AutoModelForZeroShotObjectDetection',
    ),
    ('question-answering', 'MODEL_FOR_QUESTION_ANSWERING_MAPPING_NAMES', 'AutoModelForQuestionAnswering'),
    ('text2text-generation', 'MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING_NAMES', 'AutoModelForSeq2SeqLM'),
    ('text-classification', 'MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING_NAMES', 'AutoModelForSequenceClassification'),
    ('automatic-speech-recognition', 'MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING_NAMES', 'AutoModelForSpeechSeq2Seq'),
    (
        'table-question-answering',
        'MODEL_FOR_TABLE_QUESTION_ANSWERING_MAPPING_NAMES',
        'AutoModelForTableQuestionAnswering',
    ),
    ('token-classification', 'MODEL_FOR_TOKEN_CLASSIFICATION_MAPPING_NAMES', 'AutoModelForTokenClassification'),
    ('multiple-choice', 'MODEL_FOR_MULTIPLE_CHOICE_MAPPING_NAMES', 'AutoModelForMultipleChoice'),
    (
        'next-sentence-prediction',
        'MODEL_FOR_NEXT_SENTENCE_PREDICTION_MAPPING_NAMES',
        'AutoModelForNextSentencePrediction',
    ),
    (
        'audio-frame-classification',
        'MODEL_FOR_AUDIO_FRAME_CLASSIFICATION_MAPPING_NAMES',
        'AutoModelForAudioFrameClassification',
    ),
    ('audio-xvector', 'MODEL_FOR_AUDIO_XVECTOR_MAPPING_NAMES', 'AutoModelForAudioXVector'),
    (
        'document-question-answering',
        'MODEL_FOR_DOCUMENT_QUESTION_ANSWERING_MAPPING_NAMES',
        'AutoModelForDocumentQuestionAnswering',
    ),
    (
        'visual-question-answering',
        'MODEL_FOR_VISUAL_QUESTION_ANSWERING_MAPPING_NAMES',
        'AutoModelForVisualQuestionAnswering',
    ),
    ('image-to-text', 'MODEL_FOR_FOR_VISION_2_SEQ_MAPPING_NAMES', 'AutoModelForVision2Seq'),
    (
        'zero-shot-image-classification',
        'MODEL_FOR_ZERO_SHOT_IMAGE_CLASSIFICATION_MAPPING_NAMES',
        'AutoModelForZeroShotImageClassification',
    ),
    ('depth-estimation', 'MODEL_FOR_DEPTH_ESTIMATION_MAPPING_NAMES', 'AutoModelForDepthEstimation'),
    ('video-classification', 'MODEL_FOR_VIDEO_CLASSIFICATION_MAPPING_NAMES', 'AutoModelForVideoClassification'),
    ('mask-generation', 'MODEL_FOR_MASK_GENERATION_MAPPING_NAMES', 'AutoModelForMaskGeneration'),
]


def     _lowercase       (						__snake_case			)		->     Dict:
			__lowerCAmelCase   :						int				= re.finditer(".+?(?:(?<=[a-z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])|$)"      ,__snake_case			)
			return [m.group(0			) for m in matches]


def     _lowercase       (						)		->     Optional[Any]:
			__lowerCAmelCase   :						List[Any]				= transformers_module.models.auto.configuration_auto.CONFIG_MAPPING_NAMES
			__lowerCAmelCase   :						Optional[int]				= {
			    config.replace("Config"      ,""			): model_type for model_type, config in config_maping_names.items()
			}

			# Dictionaries flagging if each model prefix has a backend in PT/TF/Flax.
			__lowerCAmelCase   :						Optional[int]				= collections.defaultdict(__snake_case			)
			__lowerCAmelCase   :						int				= collections.defaultdict(__snake_case			)
			__lowerCAmelCase   :						Union[str, Any]				= collections.defaultdict(__snake_case			)

			# Let's lookup through all transformers object (once) and find if models are supported by a given backend.
			for attr_name in dir(__snake_case			):
						__lowerCAmelCase   :						str				= None
						if _re_tf_models.match(__snake_case			) is not None:
									__lowerCAmelCase   :						Any				= tf_models
									__lowerCAmelCase   :						int				= _re_tf_models.match(__snake_case			).groups()[0]
						elif _re_flax_models.match(__snake_case			) is not None:
									__lowerCAmelCase   :						List[Any]				= flax_models
									__lowerCAmelCase   :						str				= _re_flax_models.match(__snake_case			).groups()[0]
						elif _re_pt_models.match(__snake_case			) is not None:
									__lowerCAmelCase   :						Dict				= pt_models
									__lowerCAmelCase   :						Tuple				= _re_pt_models.match(__snake_case			).groups()[0]

						if lookup_dict is not None:
									while len(__snake_case			) > 0:
												if attr_name in model_prefix_to_model_type:
															__lowerCAmelCase   :						List[str]				= True
															break
												# Try again after removing the last word in the name
												__lowerCAmelCase   :						int				= "".join(camel_case_split(__snake_case			)[:-1]			)

			__lowerCAmelCase   :						List[Any]				= set(list(pt_models.keys()			) + list(tf_models.keys()			) + list(flax_models.keys()			)			)
			__lowerCAmelCase   :						Optional[int]				= list(__snake_case			)
			all_models.sort()

			__lowerCAmelCase   :						str				= {"model_type": all_models}
			__lowerCAmelCase   :						List[Any]				= [pt_models[t] for t in all_models]
			__lowerCAmelCase   :						str				= [tf_models[t] for t in all_models]
			__lowerCAmelCase   :						Optional[Any]				= [flax_models[t] for t in all_models]

			# Now let's use the auto-mapping names to make sure
			__lowerCAmelCase   :						Tuple				= {}
			for t in all_models:
						if t in transformers_module.models.auto.processing_auto.PROCESSOR_MAPPING_NAMES:
									__lowerCAmelCase   :						Optional[Any]				= "AutoProcessor"
						elif t in transformers_module.models.auto.tokenization_auto.TOKENIZER_MAPPING_NAMES:
									__lowerCAmelCase   :						Tuple				= "AutoTokenizer"
						elif t in transformers_module.models.auto.feature_extraction_auto.FEATURE_EXTRACTOR_MAPPING_NAMES:
									__lowerCAmelCase   :						Optional[Any]				= "AutoFeatureExtractor"
						else:
									# Default to AutoTokenizer if a model has nothing, for backward compatibility.
									__lowerCAmelCase   :						Dict				= "AutoTokenizer"

			__lowerCAmelCase   :						Optional[Any]				= [processors[t] for t in all_models]

			return pd.DataFrame(__snake_case			)


def     _lowercase       (						__snake_case			)		->     List[str]:
			__lowerCAmelCase   :						str				= [
			    transformers_module.models.auto.modeling_auto,
			    transformers_module.models.auto.modeling_tf_auto,
			    transformers_module.models.auto.modeling_flax_auto,
			]
			for pipeline_tag, model_mapping, auto_class in PIPELINE_TAGS_AND_AUTO_MODELS:
						__lowerCAmelCase   :						Optional[Any]				= [model_mapping, F"""TF_{model_mapping}""", F"""FLAX_{model_mapping}"""]
						__lowerCAmelCase   :						Optional[int]				= [auto_class, F"""TF_{auto_class}""", F"""Flax_{auto_class}"""]
						# Loop through all three frameworks
						for module, cls, mapping in zip(__snake_case      ,__snake_case      ,__snake_case			):
									# The type of pipeline may not exist in this framework
									if not hasattr(__snake_case      ,__snake_case			):
												continue
									# First extract all model_names
									__lowerCAmelCase   :						Optional[Any]				= []
									for name in getattr(__snake_case      ,__snake_case			).values():
												if isinstance(__snake_case      ,__snake_case			):
															model_names.append(__snake_case			)
												else:
															model_names.extend(list(__snake_case			)			)

            # Add pipeline tag and auto model class for those models
									table.update({model_name: (pipeline_tag, cls) for model_name in model_names}			)

			return table


def     _lowercase       (						__snake_case      ,__snake_case			)		->     Any:
			__lowerCAmelCase   :						Union[str, Any]				= get_frameworks_table()
			__lowerCAmelCase   :						List[Any]				= Dataset.from_pandas(__snake_case			)

			__lowerCAmelCase   :						str				= hf_hub_download(
			    "huggingface/transformers-metadata"      ,"pipeline_tags.json"      ,repo_type="dataset"      ,token=__snake_case			)
			__lowerCAmelCase   :						List[str]				= Dataset.from_json(__snake_case			)
			__lowerCAmelCase   :						Dict				= {
			    tags_dataset[i]["model_class"]: (tags_dataset[i]["pipeline_tag"], tags_dataset[i]["auto_class"])
			    for i in range(len(__snake_case			)			)
			}
			__lowerCAmelCase   :						Optional[int]				= update_pipeline_and_auto_class_table(__snake_case			)

			# Sort the model classes to avoid some nondeterministic updates to create false update commits.
			__lowerCAmelCase   :						Dict				= sorted(table.keys()			)
			__lowerCAmelCase   :						Optional[int]				= pd.DataFrame(
			    {
			        "model_class": model_classes,
			        "pipeline_tag": [table[m][0] for m in model_classes],
			        "auto_class": [table[m][1] for m in model_classes],
			    }			)
			__lowerCAmelCase   :						Dict				= Dataset.from_pandas(__snake_case			)

			with tempfile.TemporaryDirectory() as tmp_dir:
						frameworks_dataset.to_json(os.path.join(__snake_case      ,"frameworks.json"			)			)
						tags_dataset.to_json(os.path.join(__snake_case      ,"pipeline_tags.json"			)			)

						if commit_sha is not None:
									__lowerCAmelCase   :						Optional[Any]				= (
									    F"""Update with commit {commit_sha}\n\nSee: """
									    F"""https://github.com/huggingface/transformers/commit/{commit_sha}"""
									)
						else:
									__lowerCAmelCase   :						List[str]				= "Update"

						upload_folder(
						    repo_id="huggingface/transformers-metadata"      ,folder_path=__snake_case      ,repo_type="dataset"      ,token=__snake_case      ,commit_message=__snake_case      ,)


def     _lowercase       (						)		->     List[Any]:
			__lowerCAmelCase   :						Dict				= {tag: cls for tag, _, cls in PIPELINE_TAGS_AND_AUTO_MODELS}
			__lowerCAmelCase   :						List[str]				= transformers_module.pipelines.SUPPORTED_TASKS
			__lowerCAmelCase   :						Tuple				= []
			for key in pipeline_tasks:
						if key not in in_table:
									__lowerCAmelCase   :						Tuple				= pipeline_tasks[key]["pt"]
									if isinstance(__snake_case      ,(list, tuple)			):
												__lowerCAmelCase   :						Dict				= model[0]
									__lowerCAmelCase   :						List[Any]				= model.__name__
									if model not in in_table.values():
												missing.append(__snake_case			)

			if len(__snake_case			) > 0:
						__lowerCAmelCase   :						List[str]				= ", ".join(__snake_case			)
						raise ValueError(
						    "The following pipeline tags are not present in the `PIPELINE_TAGS_AND_AUTO_MODELS` constant inside "
						    F"""`utils/update_metadata.py`: {msg}. Please add them!"""			)


if __name__ == "__main__":
	__snake_case							:     Union[str, Any]   =					argparse.ArgumentParser()
	parser.add_argument('--token', type=str, help='The token to use to push to the transformers-metadata dataset.')
	parser.add_argument('--commit_sha', type=str, help='The sha of the commit going with this update.')
	parser.add_argument('--check-only', action='store_true', help='Activate to just check all pipelines are present.')
	__snake_case							:     Optional[Any]   =					parser.parse_args()

	if args.check_only:
		check_pipeline_tags()
	else:
		update_metadata(args.token, args.commit_sha)




"""simple docstring"""






import unittest

from transformers import AlbertTokenizer, AlbertTokenizerFast
from transformers.testing_utils import get_tests_dir, require_sentencepiece, require_tokenizers, slow

from ...test_tokenization_common import TokenizerTesterMixin


__snake_case							:     Any   =					get_tests_dir('fixtures/spiece.model')



@require_sentencepiece
@require_tokenizers
class     A__     (						__SCREAMING_SNAKE_CASE						,	unittest.TestCase							):




	'''simple docstring'''





	SCREAMING_SNAKE_CASE					   =			AlbertTokenizer
	SCREAMING_SNAKE_CASE					   =			AlbertTokenizerFast
	SCREAMING_SNAKE_CASE					   =			True
	SCREAMING_SNAKE_CASE					   =			True
	SCREAMING_SNAKE_CASE					   =			True

	def 							_SCREAMING_SNAKE_CASE     (  self:	Dict)       -> Optional[int]:

				"""simple docstring"""

				super().setUp()

				# We have a SentencePiece fixture for testing
				__lowerCAmelCase   :						List[Any]				= AlbertTokenizer(_SCREAMING_SNAKE_CASE)
				tokenizer.save_pretrained(self.tmpdirname)

	def 							_SCREAMING_SNAKE_CASE     (  self:	Union[str, Any] ,    _SCREAMING_SNAKE_CASE:	Optional[int])       -> str:

				"""simple docstring"""

				__lowerCAmelCase   :						int				= "this is a test"
				__lowerCAmelCase   :						Any				= "this is a test"
				return input_text, output_text

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

				"""simple docstring"""

				__lowerCAmelCase   :						Tuple				= "<pad>"
				__lowerCAmelCase   :						List[str]				= 0

				self.assertEqual(self.get_tokenizer()._convert_token_to_id(_SCREAMING_SNAKE_CASE) ,    _SCREAMING_SNAKE_CASE)
				self.assertEqual(self.get_tokenizer()._convert_id_to_token(_SCREAMING_SNAKE_CASE) ,    _SCREAMING_SNAKE_CASE)

	def 							_SCREAMING_SNAKE_CASE     (  self:	str)       -> List[Any]:

				"""simple docstring"""

				__lowerCAmelCase   :						Dict				= list(self.get_tokenizer().get_vocab().keys())

				self.assertEqual(vocab_keys[0] ,    "<pad>")
				self.assertEqual(vocab_keys[1] ,    "<unk>")
				self.assertEqual(vocab_keys[-1] ,    "▁eloquent")
				self.assertEqual(len(_SCREAMING_SNAKE_CASE) ,    3_0000)

	def 							_SCREAMING_SNAKE_CASE     (  self:	Optional[Any])       -> str:

				"""simple docstring"""

				self.assertEqual(self.get_tokenizer().vocab_size ,    3_0000)

	def 							_SCREAMING_SNAKE_CASE     (  self:	Union[str, Any])       -> List[Any]:

				"""simple docstring"""

				if not self.test_rust_tokenizer:
							return

				__lowerCAmelCase   :						List[str]				= self.get_tokenizer()
				__lowerCAmelCase   :						Dict				= self.get_rust_tokenizer()

				__lowerCAmelCase   :						Optional[int]				= "I was born in 92000, and this is falsé."

				__lowerCAmelCase   :						Tuple				= tokenizer.tokenize(_SCREAMING_SNAKE_CASE)
				__lowerCAmelCase   :						List[str]				= rust_tokenizer.tokenize(_SCREAMING_SNAKE_CASE)
				self.assertListEqual(_SCREAMING_SNAKE_CASE ,    _SCREAMING_SNAKE_CASE)

				__lowerCAmelCase   :						List[Any]				= tokenizer.encode(_SCREAMING_SNAKE_CASE ,    add_special_tokens=_SCREAMING_SNAKE_CASE)
				__lowerCAmelCase   :						Any				= rust_tokenizer.encode(_SCREAMING_SNAKE_CASE ,    add_special_tokens=_SCREAMING_SNAKE_CASE)
				self.assertListEqual(_SCREAMING_SNAKE_CASE ,    _SCREAMING_SNAKE_CASE)

				__lowerCAmelCase   :						List[str]				= self.get_rust_tokenizer()
				__lowerCAmelCase   :						str				= tokenizer.encode(_SCREAMING_SNAKE_CASE)
				__lowerCAmelCase   :						Dict				= rust_tokenizer.encode(_SCREAMING_SNAKE_CASE)
				self.assertListEqual(_SCREAMING_SNAKE_CASE ,    _SCREAMING_SNAKE_CASE)

	def 							_SCREAMING_SNAKE_CASE     (  self:	List[str])       -> int:

				"""simple docstring"""

				__lowerCAmelCase   :						Optional[int]				= AlbertTokenizer(_SCREAMING_SNAKE_CASE ,    keep_accents=_SCREAMING_SNAKE_CASE)

				__lowerCAmelCase   :						List[str]				= tokenizer.tokenize("This is a test")
				self.assertListEqual(_SCREAMING_SNAKE_CASE ,    ["▁this", "▁is", "▁a", "▁test"])

				self.assertListEqual(tokenizer.convert_tokens_to_ids(_SCREAMING_SNAKE_CASE) ,    [48, 25, 21, 1289])

				__lowerCAmelCase   :						Union[str, Any]				= tokenizer.tokenize("I was born in 92000, and this is falsé.")
				self.assertListEqual(
				    _SCREAMING_SNAKE_CASE ,    ["▁i", "▁was", "▁born", "▁in", "▁9", "2000", ",", "▁and", "▁this", "▁is", "▁fal", "s", "é", "."])
				__lowerCAmelCase   :						Dict				= tokenizer.convert_tokens_to_ids(_SCREAMING_SNAKE_CASE)
				self.assertListEqual(_SCREAMING_SNAKE_CASE ,    [31, 23, 386, 19, 561, 3050, 15, 17, 48, 25, 8256, 18, 1, 9])

				__lowerCAmelCase   :						Any				= tokenizer.convert_ids_to_tokens(_SCREAMING_SNAKE_CASE)
				self.assertListEqual(
				    _SCREAMING_SNAKE_CASE ,    ["▁i", "▁was", "▁born", "▁in", "▁9", "2000", ",", "▁and", "▁this", "▁is", "▁fal", "s", "<unk>", "."] ,    )

	def 							_SCREAMING_SNAKE_CASE     (  self:	Tuple)       -> str:

				"""simple docstring"""

				__lowerCAmelCase   :						int				= AlbertTokenizer(_SCREAMING_SNAKE_CASE)

				__lowerCAmelCase   :						Dict				= tokenizer.encode("sequence builders")
				__lowerCAmelCase   :						List[Any]				= tokenizer.encode("multi-sequence build")

				__lowerCAmelCase   :						Union[str, Any]				= tokenizer.build_inputs_with_special_tokens(_SCREAMING_SNAKE_CASE)
				__lowerCAmelCase   :						List[str]				= tokenizer.build_inputs_with_special_tokens(_SCREAMING_SNAKE_CASE ,    _SCREAMING_SNAKE_CASE)

				assert encoded_sentence == [tokenizer.cls_token_id] + text + [tokenizer.sep_token_id]
				assert encoded_pair == [tokenizer.cls_token_id] + text + [tokenizer.sep_token_id] + text_a + [
				    tokenizer.sep_token_id
				]







	@slow
	def 							_SCREAMING_SNAKE_CASE     (  self:	int)       -> List[str]:

				"""simple docstring"""

				__lowerCAmelCase   :						Tuple				= {"attention_mask": [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], "input_ids": [[2, 2_1970, 13, 5, 6092, 167, 28, 7103, 2153, 673, 8, 7028, 1_2051, 18, 17, 7103, 2153, 673, 8, 3515, 1_8684, 8, 4461, 6, 1927, 297, 8, 1_2060, 2607, 18, 13, 5, 4461, 15, 1_0538, 38, 8, 135, 15, 822, 58, 15, 993, 1_0363, 15, 1460, 8005, 4461, 15, 993, 255, 2328, 9, 9, 9, 6, 26, 1112, 816, 3260, 13, 5, 103, 2377, 6, 17, 1112, 816, 2782, 13, 5, 103, 1_0641, 6, 29, 84, 2512, 2430, 782, 1_8684, 2761, 19, 808, 2430, 2556, 17, 855, 1480, 9477, 4091, 128, 1_1712, 15, 7103, 2153, 673, 17, 2_4883, 9990, 9, 3], [2, 1_1502, 25, 1006, 20, 782, 8, 1_1809, 855, 1732, 1_9393, 1_8667, 37, 367, 2_1018, 69, 1854, 34, 1_1860, 1_9124, 27, 156, 225, 17, 193, 4141, 19, 65, 9124, 9, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 14, 2231, 886, 2385, 1_7659, 84, 14, 1_6792, 1952, 9, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], "token_type_ids": [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]}  # noqa: E501
				# fmt: on

				self.tokenizer_integration_test_util(
				    expected_encoding=_SCREAMING_SNAKE_CASE ,    model_name="albert-base-v2" ,    revision="6b6560eaf5ff2e250b00c50f380c5389a9c2d82e" ,    )