
import json
import pathlib
import unittest

import numpy as np

from transformers.testing_utils import require_torch, require_vision, slow
from transformers.utils import is_torch_available, is_vision_available

from ...test_image_processing_common import ImageProcessingSavingTestMixin, prepare_image_inputs


if is_torch_available():
		import torch

if is_vision_available():
		from PIL import Image

		from transformers import DetaImageProcessor




class  lowerCamelCase__							(				unittest.TestCase):




	'''simple docstring'''




	def __init__(					self		:Union[str, Any]     ,   a		:Optional[int]     ,   a		:int=7     ,   a		:Tuple=3     ,   a		:int=3_0     ,   a		:Any=4_0_0     ,   a		:Optional[int]=True     ,   a		:Any=None     ,   a		:Optional[int]=True     ,   a		:List[str]=[0.5, 0.5, 0.5]     ,   a		:Optional[Any]=[0.5, 0.5, 0.5]     ,   a		:Optional[int]=True     ,   a		:List[str]=1 / 2_5_5     ,   a		:Any=True     ,   )		-> Optional[Any]:
								# by setting size["longest_edge"] > max_resolution we're effectively not testing this :p
								__UpperCamelCase	:   Optional[int]			   =					size if size is not None else {"""shortest_edge""": 1_8, """longest_edge""": 1_3_3_3}
								__UpperCamelCase	:   Optional[Any]			   =					parent
								__UpperCamelCase	:   Optional[Any]			   =					batch_size
								__UpperCamelCase	:   Any			   =					num_channels
								__UpperCamelCase	:   int			   =					min_resolution
								__UpperCamelCase	:   List[Any]			   =					max_resolution
								__UpperCamelCase	:   int			   =					do_resize
								__UpperCamelCase	:   Union[str, Any]			   =					size
								__UpperCamelCase	:   Any			   =					do_normalize
								__UpperCamelCase	:   str			   =					image_mean
								__UpperCamelCase	:   Any			   =					image_std
								__UpperCamelCase	:   Union[str, Any]			   =					do_rescale
								__UpperCamelCase	:   List[str]			   =					rescale_factor
								__UpperCamelCase	:   List[Any]			   =					do_pad







	def    _lowerCamelCase				(					self		:Optional[Any]						)		-> List[str]:
								return {
								    "do_resize": self.do_resize,
								    "size": self.size,
								    "do_normalize": self.do_normalize,
								    "image_mean": self.image_mean,
								    "image_std": self.image_std,
								    "do_rescale": self.do_rescale,
								    "rescale_factor": self.rescale_factor,
								    "do_pad": self.do_pad,
								}







	def    _lowerCamelCase				(					self		:int     ,   a		:List[Any]     ,   a		:Any=False						)		-> Dict:
								if not batched:
															__UpperCamelCase	:   str			   =					image_inputs[0]
															if isinstance(a     ,   Image.Image						):
																						__UpperCamelCase	:   Tuple			   =					image.size
															else:
																						__UpperCamelCase	:   str			   =					image.shape[1], image.shape[2]
															if w < h:
																						__UpperCamelCase	:   Tuple			   =					int(self.size["shortest_edge"] * h / w						)
																						__UpperCamelCase	:   Any			   =					self.size["""shortest_edge"""]
															elif w > h:
																						__UpperCamelCase	:   Tuple			   =					self.size["""shortest_edge"""]
																						__UpperCamelCase	:   int			   =					int(self.size["shortest_edge"] * w / h						)
															else:
																						__UpperCamelCase	:   Any			   =					self.size["""shortest_edge"""]
																						__UpperCamelCase	:   Optional[int]			   =					self.size["""shortest_edge"""]

								else:
															__UpperCamelCase	:   int			   =					[]
															for image in image_inputs:
																						__UpperCamelCase	:   Union[str, Any]			   =					self.get_expected_values([image]						)
																						expected_values.append((expected_height, expected_width)						)
															__UpperCamelCase	:   List[Any]			   =					max(a     ,   key=lambda a						: item[0]						)[0]
															__UpperCamelCase	:   Dict			   =					max(a     ,   key=lambda a						: item[1]						)[1]

								return expected_height, expected_width




@require_torch
@require_vision
class  lowerCamelCase__							(				__lowercase     ,						unittest.TestCase):




	'''simple docstring'''




	_A								=     DetaImageProcessor if is_vision_available() else None







	def    _lowerCamelCase				(					self		:Any						)		-> Any:
								__UpperCamelCase	:   str			   =					DetaImageProcessingTester(self						)







	@property
	def    _lowerCamelCase				(					self		:Optional[Any]						)		-> Optional[int]:
								return self.image_processor_tester.prepare_image_processor_dict()







	def    _lowerCamelCase				(					self		:Any						)		-> List[str]:
								__UpperCamelCase	:   int			   =					self.image_processing_class(**self.image_processor_dict						)
								self.assertTrue(hasattr(a     ,   "image_mean"						)						)
								self.assertTrue(hasattr(a     ,   "image_std"						)						)
								self.assertTrue(hasattr(a     ,   "do_normalize"						)						)
								self.assertTrue(hasattr(a     ,   "do_resize"						)						)
								self.assertTrue(hasattr(a     ,   "do_rescale"						)						)
								self.assertTrue(hasattr(a     ,   "do_pad"						)						)
								self.assertTrue(hasattr(a     ,   "size"						)						)







	def    _lowerCamelCase				(					self		:str						)		-> Tuple:
								__UpperCamelCase	:   str			   =					self.image_processing_class.from_dict(self.image_processor_dict						)
								self.assertEqual(image_processor.size     ,   {"shortest_edge": 1_8, "longest_edge": 1_3_3_3}						)
								self.assertEqual(image_processor.do_pad     ,   a						)







	def    _lowerCamelCase				(					self		:Optional[Any]						)		-> int:
								pass







	def    _lowerCamelCase				(					self		:int						)		-> Dict:
								# Initialize image_processing
								__UpperCamelCase	:   Any			   =					self.image_processing_class(**self.image_processor_dict						)
								# create random PIL images
								__UpperCamelCase	:   Union[str, Any]			   =					prepare_image_inputs(self.image_processor_tester     ,   equal_resolution=a						)
								for image in image_inputs:
															self.assertIsInstance(a     ,   Image.Image						)

								# Test not batched input
								__UpperCamelCase	:   Optional[int]			   =					image_processing(image_inputs[0]     ,   return_tensors="pt"						).pixel_values

								__UpperCamelCase	:   Any			   =					self.image_processor_tester.get_expected_values(a						)

								self.assertEqual(
								    encoded_images.shape     ,   (1, self.image_processor_tester.num_channels, expected_height, expected_width)     ,   )

								# Test batched
								__UpperCamelCase	:   Dict			   =					self.image_processor_tester.get_expected_values(a     ,   batched=a						)

								__UpperCamelCase	:   Union[str, Any]			   =					image_processing(a     ,   return_tensors="pt"						).pixel_values
								self.assertEqual(
								    encoded_images.shape     ,   (
								        self.image_processor_tester.batch_size,
								        self.image_processor_tester.num_channels,
								        expected_height,
								        expected_width,
								    )     ,   )







	def    _lowerCamelCase				(					self		:Optional[int]						)		-> List[Any]:
								# Initialize image_processing
								__UpperCamelCase	:   Optional[Any]			   =					self.image_processing_class(**self.image_processor_dict						)
								# create random numpy tensors
								__UpperCamelCase	:   Union[str, Any]			   =					prepare_image_inputs(self.image_processor_tester     ,   equal_resolution=a     ,   numpify=a						)
								for image in image_inputs:
															self.assertIsInstance(a     ,   np.ndarray						)

								# Test not batched input
								__UpperCamelCase	:   str			   =					image_processing(image_inputs[0]     ,   return_tensors="pt"						).pixel_values

								__UpperCamelCase	:   List[Any]			   =					self.image_processor_tester.get_expected_values(a						)

								self.assertEqual(
								    encoded_images.shape     ,   (1, self.image_processor_tester.num_channels, expected_height, expected_width)     ,   )

								# Test batched
								__UpperCamelCase	:   List[str]			   =					image_processing(a     ,   return_tensors="pt"						).pixel_values

								__UpperCamelCase	:   List[Any]			   =					self.image_processor_tester.get_expected_values(a     ,   batched=a						)

								self.assertEqual(
								    encoded_images.shape     ,   (
								        self.image_processor_tester.batch_size,
								        self.image_processor_tester.num_channels,
								        expected_height,
								        expected_width,
								    )     ,   )







	def    _lowerCamelCase				(					self		:Tuple						)		-> str:
								# Initialize image_processing
								__UpperCamelCase	:   str			   =					self.image_processing_class(**self.image_processor_dict						)
								# create random PyTorch tensors
								__UpperCamelCase	:   str			   =					prepare_image_inputs(self.image_processor_tester     ,   equal_resolution=a     ,   torchify=a						)
								for image in image_inputs:
															self.assertIsInstance(a     ,   torch.Tensor						)

								# Test not batched input
								__UpperCamelCase	:   List[Any]			   =					image_processing(image_inputs[0]     ,   return_tensors="pt"						).pixel_values

								__UpperCamelCase	:   int			   =					self.image_processor_tester.get_expected_values(a						)

								self.assertEqual(
								    encoded_images.shape     ,   (1, self.image_processor_tester.num_channels, expected_height, expected_width)     ,   )

								# Test batched
								__UpperCamelCase	:   Dict			   =					image_processing(a     ,   return_tensors="pt"						).pixel_values

								__UpperCamelCase	:   Dict			   =					self.image_processor_tester.get_expected_values(a     ,   batched=a						)

								self.assertEqual(
								    encoded_images.shape     ,   (
								        self.image_processor_tester.batch_size,
								        self.image_processor_tester.num_channels,
								        expected_height,
								        expected_width,
								    )     ,   )







	@slow
	def    _lowerCamelCase				(					self		:List[Any]						)		-> List[str]:
								# prepare image and target
								__UpperCamelCase	:   Union[str, Any]			   =					Image.open("./tests/fixtures/tests_samples/COCO/000000039769.png"						)
								with open("./tests/fixtures/tests_samples/COCO/coco_annotations.txt"     ,   "r"						) as f:
															__UpperCamelCase	:   str			   =					json.loads(f.read()						)

								__UpperCamelCase	:   List[str]			   =					{"""image_id""": 3_9_7_6_9, """annotations""": target}

								# encode them
								__UpperCamelCase	:   Union[str, Any]			   =					DetaImageProcessor()
								__UpperCamelCase	:   Tuple			   =					image_processing(images=a     ,   annotations=a     ,   return_tensors="pt"						)

								# verify pixel values
								__UpperCamelCase	:   List[str]			   =					torch.Size([1, 3, 8_0_0, 1_0_6_6]						)
								self.assertEqual(encoding["pixel_values"].shape     ,   a						)

								__UpperCamelCase	:   Union[str, Any]			   =					torch.tensor([0.2796, 0.3138, 0.3481]						)
								self.assertTrue(torch.allclose(encoding["pixel_values"][0, 0, 0, :3]     ,   a     ,   atol=1E-4						)						)

								# verify area
								__UpperCamelCase	:   Optional[int]			   =					torch.tensor([5_8_8_7.9_6_0_0, 1_1_2_5_0.2_0_6_1, 4_8_9_3_5_3.8_4_3_8, 8_3_7_1_2_2.7_5_0_0, 1_4_7_9_6_7.5_1_5_6, 1_6_5_7_3_2.3_4_3_8]						)
								self.assertTrue(torch.allclose(encoding["labels"][0]["area"]     ,   a						)						)
								# verify boxes
								__UpperCamelCase	:   Optional[int]			   =					torch.Size([6, 4]						)
								self.assertEqual(encoding["labels"][0]["boxes"].shape     ,   a						)
								__UpperCamelCase	:   str			   =					torch.tensor([0.5503, 0.2765, 0.0604, 0.2215]						)
								self.assertTrue(torch.allclose(encoding["labels"][0]["boxes"][0]     ,   a     ,   atol=1E-3						)						)
								# verify image_id
								__UpperCamelCase	:   Tuple			   =					torch.tensor([3_9_7_6_9]						)
								self.assertTrue(torch.allclose(encoding["labels"][0]["image_id"]     ,   a						)						)
								# verify is_crowd
								__UpperCamelCase	:   List[str]			   =					torch.tensor([0, 0, 0, 0, 0, 0]						)
								self.assertTrue(torch.allclose(encoding["labels"][0]["iscrowd"]     ,   a						)						)
								# verify class_labels
								__UpperCamelCase	:   Dict			   =					torch.tensor([7_5, 7_5, 6_3, 6_5, 1_7, 1_7]						)
								self.assertTrue(torch.allclose(encoding["labels"][0]["class_labels"]     ,   a						)						)
								# verify orig_size
								__UpperCamelCase	:   int			   =					torch.tensor([4_8_0, 6_4_0]						)
								self.assertTrue(torch.allclose(encoding["labels"][0]["orig_size"]     ,   a						)						)
								# verify size
								__UpperCamelCase	:   Dict			   =					torch.tensor([8_0_0, 1_0_6_6]						)
								self.assertTrue(torch.allclose(encoding["labels"][0]["size"]     ,   a						)						)







	@slow
	def    _lowerCamelCase				(					self		:Optional[Any]						)		-> int:
								# prepare image, target and masks_path
								__UpperCamelCase	:   List[str]			   =					Image.open("./tests/fixtures/tests_samples/COCO/000000039769.png"						)
								with open("./tests/fixtures/tests_samples/COCO/coco_panoptic_annotations.txt"     ,   "r"						) as f:
															__UpperCamelCase	:   Any			   =					json.loads(f.read()						)

								__UpperCamelCase	:   int			   =					{"""file_name""": """000000039769.png""", """image_id""": 3_9_7_6_9, """segments_info""": target}

								__UpperCamelCase	:   Union[str, Any]			   =					pathlib.Path("./tests/fixtures/tests_samples/COCO/coco_panoptic"						)

								# encode them
								__UpperCamelCase	:   Optional[Any]			   =					DetaImageProcessor(format="coco_panoptic"						)
								__UpperCamelCase	:   Union[str, Any]			   =					image_processing(images=a     ,   annotations=a     ,   masks_path=a     ,   return_tensors="pt"						)

								# verify pixel values
								__UpperCamelCase	:   Union[str, Any]			   =					torch.Size([1, 3, 8_0_0, 1_0_6_6]						)
								self.assertEqual(encoding["pixel_values"].shape     ,   a						)

								__UpperCamelCase	:   Union[str, Any]			   =					torch.tensor([0.2796, 0.3138, 0.3481]						)
								self.assertTrue(torch.allclose(encoding["pixel_values"][0, 0, 0, :3]     ,   a     ,   atol=1E-4						)						)

								# verify area
								__UpperCamelCase	:   int			   =					torch.tensor([1_4_7_9_7_9.6_8_7_5, 1_6_5_5_2_7.0_4_6_9, 4_8_4_6_3_8.5_9_3_8, 1_1_2_9_2.9_3_7_5, 5_8_7_9.6_5_6_2, 7_6_3_4.1_1_4_7]						)
								self.assertTrue(torch.allclose(encoding["labels"][0]["area"]     ,   a						)						)
								# verify boxes
								__UpperCamelCase	:   List[Any]			   =					torch.Size([6, 4]						)
								self.assertEqual(encoding["labels"][0]["boxes"].shape     ,   a						)
								__UpperCamelCase	:   Tuple			   =					torch.tensor([0.2625, 0.5437, 0.4688, 0.8625]						)
								self.assertTrue(torch.allclose(encoding["labels"][0]["boxes"][0]     ,   a     ,   atol=1E-3						)						)
								# verify image_id
								__UpperCamelCase	:   Dict			   =					torch.tensor([3_9_7_6_9]						)
								self.assertTrue(torch.allclose(encoding["labels"][0]["image_id"]     ,   a						)						)
								# verify is_crowd
								__UpperCamelCase	:   Optional[int]			   =					torch.tensor([0, 0, 0, 0, 0, 0]						)
								self.assertTrue(torch.allclose(encoding["labels"][0]["iscrowd"]     ,   a						)						)
								# verify class_labels
								__UpperCamelCase	:   List[Any]			   =					torch.tensor([1_7, 1_7, 6_3, 7_5, 7_5, 9_3]						)
								self.assertTrue(torch.allclose(encoding["labels"][0]["class_labels"]     ,   a						)						)
								# verify masks
								__UpperCamelCase	:   Any			   =					8_2_2_8_7_3
								self.assertEqual(encoding["labels"][0]["masks"].sum().item()     ,   a						)
								# verify orig_size
								__UpperCamelCase	:   Any			   =					torch.tensor([4_8_0, 6_4_0]						)
								self.assertTrue(torch.allclose(encoding["labels"][0]["orig_size"]     ,   a						)						)
								# verify size
								__UpperCamelCase	:   Any			   =					torch.tensor([8_0_0, 1_0_6_6]						)
								self.assertTrue(torch.allclose(encoding["labels"][0]["size"]     ,   a						)						)




'''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


a   :			Any					  =    get_tests_dir("""fixtures/spiece.model""")

@require_sentencepiece
@require_tokenizers
class 			UpperCamelCase_ (							__magic_name__      ,     unittest.TestCase			):
	lowercase          = AlbertTokenizer
	lowercase          = AlbertTokenizerFast
	lowercase          = True
	lowercase          = True
	lowercase          = True





	def  _lowercase(  self    )			->			str:
								super().setUp()

								# We have a SentencePiece fixture for testing
								UpperCAmelCase     :		Optional[int]							     =		AlbertTokenizer(A    )
								tokenizer.save_pretrained(self.tmpdirname    )





	def  _lowercase(  self		,		A    )			->			int:
								UpperCAmelCase     :		Optional[int]							     =		"""this is a test"""
								UpperCAmelCase     :		Dict							     =		"""this is a test"""
								return input_text, output_text





	def  _lowercase(  self    )			->			int:
								UpperCAmelCase     :		Tuple							     =		"""<pad>"""
								UpperCAmelCase     :		Optional[int]							     =		0

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





	def  _lowercase(  self    )			->			Any:
								UpperCAmelCase     :		str							     =		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(A    )		,		30000    )





	def  _lowercase(  self    )			->			Tuple:
								self.assertEqual(self.get_tokenizer().vocab_size		,		30000    )





	def  _lowercase(  self    )			->			Union[str, Any]:
								if not self.test_rust_tokenizer:
															return

								UpperCAmelCase     :		int							     =		self.get_tokenizer()
								UpperCAmelCase     :		List[str]							     =		self.get_rust_tokenizer()

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

								UpperCAmelCase     :		str							     =		tokenizer.tokenize(A    )
								UpperCAmelCase     :		Optional[int]							     =		rust_tokenizer.tokenize(A    )
								self.assertListEqual(A		,		A    )

								UpperCAmelCase     :		Any							     =		tokenizer.encode(A		,		add_special_tokens=A    )
								UpperCAmelCase     :		Optional[int]							     =		rust_tokenizer.encode(A		,		add_special_tokens=A    )
								self.assertListEqual(A		,		A    )

								UpperCAmelCase     :		Optional[Any]							     =		self.get_rust_tokenizer()
								UpperCAmelCase     :		Union[str, Any]							     =		tokenizer.encode(A    )
								UpperCAmelCase     :		Optional[int]							     =		rust_tokenizer.encode(A    )
								self.assertListEqual(A		,		A    )





	def  _lowercase(  self    )			->			Any:
								UpperCAmelCase     :		List[Any]							     =		AlbertTokenizer(A		,		keep_accents=A    )

								UpperCAmelCase     :		Optional[int]							     =		tokenizer.tokenize("""This is a test"""    )
								self.assertListEqual(A		,		["""▁this""", """▁is""", """▁a""", """▁test"""]    )

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

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

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





	def  _lowercase(  self    )			->			Optional[Any]:
								UpperCAmelCase     :		str							     =		AlbertTokenizer(A    )

								UpperCAmelCase     :		Optional[int]							     =		tokenizer.encode("""sequence builders"""    )
								UpperCAmelCase     :		Any							     =		tokenizer.encode("""multi-sequence build"""    )

								UpperCAmelCase     :		Optional[Any]							     =		tokenizer.build_inputs_with_special_tokens(A    )
								UpperCAmelCase     :		List[str]							     =		tokenizer.build_inputs_with_special_tokens(A		,		A    )

								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  _lowercase(  self    )			->			Dict:
								# fmt: off
								UpperCAmelCase     :		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, 21970, 13, 5, 6092, 167, 28, 7103, 2153, 673, 8, 7028, 12051, 18, 17, 7103, 2153, 673, 8, 3515, 18684, 8, 4461, 6, 1927, 297, 8, 12060, 2607, 18, 13, 5, 4461, 15, 10538, 38, 8, 135, 15, 822, 58, 15, 993, 10363, 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, 10641, 6, 29, 84, 2512, 2430, 782, 18684, 2761, 19, 808, 2430, 2556, 17, 855, 1480, 9477, 4091, 128, 11712, 15, 7103, 2153, 673, 17, 24883, 9990, 9, 3], [2, 11502, 25, 1006, 20, 782, 8, 11809, 855, 1732, 19393, 18667, 37, 367, 21018, 69, 1854, 34, 11860, 19124, 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, 17659, 84, 14, 16792, 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=A		,		model_name="""albert-base-v2"""		,		revision="""6b6560eaf5ff2e250b00c50f380c5389a9c2d82e"""		,		)

