"""simple docstring"""







import inspect
import unittest

import numpy as np

from tests.test_modeling_common import floats_tensor
from transformers import MaskaFormerConfig, is_torch_available, is_vision_available
from transformers.testing_utils import require_torch, require_torch_multi_gpu, require_vision, slow, torch_device
from transformers.utils import cached_property

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
	import torch

	from transformers import MaskaFormerForUniversalSegmentation, MaskaFormerModel

	if is_vision_available():
		from transformers import MaskaFormerImageProcessor

if is_vision_available():
	from PIL import Image

class 	UpperCamelCase    :



				def __init__(self       :   int			,						_A       :   Optional[int]			,						_A       :   int=2			,						_A       :   List[Any]=True			,						_A       :   Union[str, Any]=False			,						_A       :   Dict=10			,						_A       :   Any=3			,						_A       :   Tuple=32 * 8			,						_A       :   Dict=32 * 8			,						_A       :   str=4			,						_A       :   List[Any]=64			,						)					->			Dict:
					__snake_case    :							Optional[Any]   	=				parent
					__snake_case    :							Any   	=				batch_size
					__snake_case    :							Optional[Any]   	=				is_training
					__snake_case    :							List[str]   	=				use_auxiliary_loss
					__snake_case    :							List[str]   	=				num_queries
					__snake_case    :							Optional[int]   	=				num_channels
					__snake_case    :							int   	=				min_size
					__snake_case    :							Optional[Any]   	=				max_size
					__snake_case    :							Dict   	=				num_labels
					__snake_case    :							List[Any]   	=				hidden_dim
					__snake_case    :							int   	=				hidden_dim



				def       _lowercase  (self       :   Tuple)					->			Dict:
					__snake_case    :							Tuple   	=				floats_tensor([self.batch_size, self.num_channels, self.min_size, self.max_size]).to(
					    _A)

					__snake_case    :							Any   	=				torch.ones([self.batch_size, self.min_size, self.max_size]			,						device=_A)

					__snake_case    :							str   	=				(
					    torch.rand([self.batch_size, self.num_labels, self.min_size, self.max_size]			,						device=_A) > 0.5
					).float()
					__snake_case    :							Optional[Any]   	=				(torch.rand((self.batch_size, self.num_labels)			,						device=_A) > 0.5).long()

					__snake_case    :							Optional[Any]   	=				self.get_config()
					return config, pixel_values, pixel_mask, mask_labels, class_labels



				def       _lowercase  (self       :   Tuple)					->			Tuple:
					__snake_case    :							int   	=				MaskaFormerConfig(
					    hidden_size=self.hidden_dim			,						)
					__snake_case    :							List[str]   	=				self.num_queries
					__snake_case    :							Any   	=				self.num_labels

					__snake_case    :							Optional[Any]   	=				[1, 1, 1, 1]
					__snake_case    :							Any   	=				self.num_channels

					__snake_case    :							str   	=				64
					__snake_case    :							Optional[int]   	=				1_28
					__snake_case    :							Dict   	=				self.hidden_dim
					__snake_case    :							Optional[Any]   	=				self.hidden_dim
					__snake_case    :							str   	=				self.hidden_dim
					return config



				def       _lowercase  (self       :   List[Any])					->			List[str]:
					__snake_case    :							Optional[int]   	=				self.prepare_config_and_inputs()
					__snake_case    :							Optional[Any]   	=				{'pixel_values': pixel_values, 'pixel_mask': pixel_mask}
					return config, inputs_dict



				def       _lowercase  (self       :   Optional[int]			,						_A       :   int			,						_A       :   Dict)					->			str:
					__snake_case    :							Dict   	=				output.encoder_hidden_states
					__snake_case    :							str   	=				output.pixel_decoder_hidden_states
					__snake_case    :							Any   	=				output.transformer_decoder_hidden_states

					self.parent.assertTrue(len(_A)			,						len(config.backbone_config.depths))
					self.parent.assertTrue(len(_A)			,						len(config.backbone_config.depths))
					self.parent.assertTrue(len(_A)			,						config.decoder_layers)



				def       _lowercase  (self       :   Optional[Any]			,						_A       :   str			,						_A       :   Tuple			,						_A       :   int			,						_A       :   Optional[Any]=False)					->			Optional[Any]:
					with torch.no_grad():
						__snake_case    :							Tuple   	=				MaskaFormerModel(config=_A)
						model.to(_A)
						model.eval()

						__snake_case    :							int   	=				model(pixel_values=_A			,						pixel_mask=_A)
						__snake_case    :							int   	=				model(_A			,						output_hidden_states=_A)

					self.parent.assertEqual(
					    output.transformer_decoder_last_hidden_state.shape			,						(self.batch_size, self.num_queries, self.hidden_dim)			,						)
					# let's ensure the other two hidden state exists
					self.parent.assertTrue(output.pixel_decoder_last_hidden_state is not None)
					self.parent.assertTrue(output.encoder_last_hidden_state is not None)

					if output_hidden_states:
						self.check_output_hidden_state(_A			,						_A)






				def       _lowercase  (self       :   List[str]			,						_A       :   List[str]			,						_A       :   Optional[int]			,						_A       :   Dict			,						_A       :   Optional[int]			,						_A       :   Optional[int])					->			Optional[Any]:
					__snake_case    :							Union[str, Any]   	=				MaskaFormerForUniversalSegmentation(config=_A)
					model.to(_A)
					model.eval()

					def comm_check_on_output(_A       :   Optional[Any]):
						# let's still check that all the required stuff is there
						self.parent.assertTrue(result.transformer_decoder_last_hidden_state is not None)
						self.parent.assertTrue(result.pixel_decoder_last_hidden_state is not None)
						self.parent.assertTrue(result.encoder_last_hidden_state is not None)
						# okay, now we need to check the logits shape
						# due to the encoder compression, masks have a //4 spatial size
						self.parent.assertEqual(
						    result.masks_queries_logits.shape			,						(self.batch_size, self.num_queries, self.min_size // 4, self.max_size // 4)			,						)
						# + 1 for null class
						self.parent.assertEqual(
						    result.class_queries_logits.shape			,						(self.batch_size, self.num_queries, self.num_labels + 1))

					with torch.no_grad():
						__snake_case    :							Tuple   	=				model(pixel_values=_A			,						pixel_mask=_A)
						__snake_case    :							Any   	=				model(_A)

						comm_check_on_output(_A)

						__snake_case    :							int   	=				model(
						    pixel_values=_A			,						pixel_mask=_A			,						mask_labels=_A			,						class_labels=_A)

					comm_check_on_output(_A)

					self.parent.assertTrue(result.loss is not None)
					self.parent.assertEqual(result.loss.shape			,						torch.Size([1]))







@require_torch
class 	UpperCamelCase    (					lowercase   ,			lowercase   ,			unittest.TestCase		):
				UpperCAmelCase       :   Tuple					=	(MaskaFormerModel, MaskaFormerForUniversalSegmentation) if is_torch_available() else ()
				UpperCAmelCase       :   Optional[int]					=	{"""feature-extraction""": MaskaFormerModel} if is_torch_available() else {}

				UpperCAmelCase       :   Optional[int]					=	False
				UpperCAmelCase       :   Optional[Any]					=	False
				UpperCAmelCase       :   Tuple					=	False
				UpperCAmelCase       :   List[str]					=	False



				def       _lowercase  (self       :   int)					->			str:
					__snake_case    :							str   	=				MaskaFormerModelTester(self)
					__snake_case    :							List[Any]   	=				ConfigTester(self			,						config_class=_A			,						has_text_modality=_A)



				def       _lowercase  (self       :   str)					->			Optional[int]:
					self.config_tester.run_common_tests()



				def       _lowercase  (self       :   Union[str, Any])					->			Any:
					__snake_case    :							Tuple   	=				self.model_tester.prepare_config_and_inputs_for_common()
					self.model_tester.create_and_check_maskaformer_model(_A			,						**_A			,						output_hidden_states=_A)



				def       _lowercase  (self       :   Union[str, Any])					->			str:
					__snake_case    :							Union[str, Any]   	=				self.model_tester.prepare_config_and_inputs()
					self.model_tester.create_and_check_maskaformer_instance_segmentation_head_model(*_A)



				@unittest.skip(reason='Mask2Former does not use inputs_embeds')
				def       _lowercase  (self       :   List[Any])					->			Any:
					pass



				@unittest.skip(reason='Mask2Former does not have a get_input_embeddings method')
				def       _lowercase  (self       :   str)					->			Tuple:
					pass



				@unittest.skip(reason='Mask2Former is not a generative model')
				def       _lowercase  (self       :   Tuple)					->			str:
					pass



				@unittest.skip(reason='Mask2Former does not use token embeddings')
				def       _lowercase  (self       :   Union[str, Any])					->			Tuple:
					pass



				@require_torch_multi_gpu
				@unittest.skip(
				    reason='Mask2Former has some layers using `add_module` which doesn\'t work well with `nn.DataParallel`')
				def       _lowercase  (self       :   str)					->			Optional[int]:
					pass



				@unittest.skip('Will be fixed soon by reducing the size of the model used for common tests.')
				def       _lowercase  (self       :   Optional[Any])					->			List[Any]:
					pass



				def       _lowercase  (self       :   Dict)					->			Union[str, Any]:
					__snake_case    :							Any   	=				self.model_tester.prepare_config_and_inputs_for_common()

					for model_class in self.all_model_classes:
						__snake_case    :							Any   	=				model_class(_A)
						__snake_case    :							Optional[int]   	=				inspect.signature(model.forward)
						# signature.parameters is an OrderedDict => so arg_names order is deterministic
						__snake_case    :							Tuple   	=				[*signature.parameters.keys()]

						__snake_case    :							List[str]   	=				['pixel_values']
						self.assertListEqual(arg_names[:1]			,						_A)



				@slow
				def       _lowercase  (self       :   Any)					->			List[str]:
					for model_name in ["facebook/mask2former-swin-small-coco-instance"]:
						__snake_case    :							List[str]   	=				MaskaFormerModel.from_pretrained(_A)
						self.assertIsNotNone(_A)



				def       _lowercase  (self       :   List[Any])					->			str:
					__snake_case    :							Optional[int]   	=				(self.model_tester.min_size,) * 2
					__snake_case    :							List[Any]   	=				{
					    'pixel_values': torch.randn((2, 3, *size)			,						device=_A),
					    'mask_labels': torch.randn((2, 10, *size)			,						device=_A),
					    'class_labels': torch.zeros(2			,						10			,						device=_A).long(),
					}
					__snake_case    :							Optional[int]   	=				self.model_tester.get_config()

					__snake_case    :							int   	=				MaskaFormerForUniversalSegmentation(_A).to(_A)
					__snake_case    :							List[Any]   	=				model(**_A)
					self.assertTrue(outputs.loss is not None)



				def       _lowercase  (self       :   Any)					->			int:
					__snake_case    :							Optional[int]   	=				self.model_tester.prepare_config_and_inputs_for_common()
					self.model_tester.create_and_check_maskaformer_model(_A			,						**_A			,						output_hidden_states=_A)



				def       _lowercase  (self       :   List[Any])					->			Union[str, Any]:
					__snake_case    :							Optional[int]   	=				self.model_tester.prepare_config_and_inputs_for_common()

					for model_class in self.all_model_classes:
						__snake_case    :							Optional[Any]   	=				model_class(_A).to(_A)
						__snake_case    :							Optional[int]   	=				model(**_A			,						output_attentions=_A)
						self.assertTrue(outputs.attentions is not None)



				def       _lowercase  (self       :   Dict)					->			Tuple:
					if not self.model_tester.is_training:
						return

					__snake_case    :							Optional[Any]   	=				self.all_model_classes[1]
					__snake_case    :							Tuple   	=				self.model_tester.prepare_config_and_inputs()

					__snake_case    :							Optional[int]   	=				model_class(_A)
					model.to(_A)
					model.train()

					__snake_case    :							List[str]   	=				model(_A			,						mask_labels=_A			,						class_labels=_A).loss
					loss.backward()






				def       _lowercase  (self       :   List[str])					->			List[str]:
					__snake_case    :							List[Any]   	=				self.all_model_classes[1]
					__snake_case    :							Optional[int]   	=				self.model_tester.prepare_config_and_inputs()
					__snake_case    :							List[str]   	=				True
					__snake_case    :							List[Any]   	=				True

					__snake_case    :							Any   	=				model_class(_A).to(_A)
					model.train()

					__snake_case    :							Union[str, Any]   	=				model(_A			,						mask_labels=_A			,						class_labels=_A)

					__snake_case    :							List[Any]   	=				outputs.encoder_hidden_states[0]
					encoder_hidden_states.retain_grad()

					__snake_case    :							Union[str, Any]   	=				outputs.pixel_decoder_hidden_states[0]
					pixel_decoder_hidden_states.retain_grad()

					__snake_case    :							Optional[int]   	=				outputs.transformer_decoder_hidden_states[0]
					transformer_decoder_hidden_states.retain_grad()

					__snake_case    :							List[str]   	=				outputs.attentions[0]
					attentions.retain_grad()

					outputs.loss.backward(retain_graph=_A)

					self.assertIsNotNone(encoder_hidden_states.grad)
					self.assertIsNotNone(pixel_decoder_hidden_states.grad)
					self.assertIsNotNone(transformer_decoder_hidden_states.grad)
					self.assertIsNotNone(attentions.grad)







_a  :  Tuple=				1e-4
def 						__UpperCAmelCase       (					)							->    Any:

	'''simple docstring'''





	__snake_case    :							Optional[int]   	=				Image.open('./tests/fixtures/tests_samples/COCO/000000039769.png'						)
	return image

@require_vision
@slow
class 	UpperCamelCase    (					unittest.TestCase		):



				@cached_property
				def       _lowercase  (self       :   Tuple)					->			Optional[Any]:
					return "facebook/mask2former-swin-small-coco-instance"



				@cached_property
				def       _lowercase  (self       :   int)					->			Dict:
					return MaskaFormerImageProcessor.from_pretrained(self.model_checkpoints) if is_vision_available() else None



				def       _lowercase  (self       :   Optional[int])					->			Optional[int]:
					__snake_case    :							Any   	=				MaskaFormerModel.from_pretrained(self.model_checkpoints).to(_A)
					__snake_case    :							List[str]   	=				self.default_image_processor
					__snake_case    :							Any   	=				prepare_img()
					__snake_case    :							str   	=				image_processor(_A			,						return_tensors='pt').to(_A)
					__snake_case    :							Optional[Any]   	=				inputs['pixel_values'].shape
					# check size is divisible by 32
					self.assertTrue((inputs_shape[-1] % 32) == 0 and (inputs_shape[-2] % 32) == 0)
					# check size
					self.assertEqual(_A			,						(1, 3, 3_84, 3_84))

					with torch.no_grad():
						__snake_case    :							List[str]   	=				model(**_A)

					__snake_case    :							Dict   	=				torch.tensor(
					    [[-0.2_790, -1.0_717, -1.1_668], [-0.5_128, -0.3_128, -0.4_987], [-0.5_832, 0.1_971, -0.0_197]]).to(_A)
					self.assertTrue(
					    torch.allclose(
					        outputs.encoder_last_hidden_state[0, 0, :3, :3]			,						_A			,						atol=_A))

					__snake_case    :							List[Any]   	=				torch.tensor(
					    [[0.8_973, 1.1_847, 1.1_776], [1.1_934, 1.5_040, 1.5_128], [1.1_153, 1.4_486, 1.4_951]]).to(_A)
					self.assertTrue(
					    torch.allclose(
					        outputs.pixel_decoder_last_hidden_state[0, 0, :3, :3]			,						_A			,						atol=_A))

					__snake_case    :							Optional[int]   	=				torch.tensor(
					    [[2.1_152, 1.7_000, -0.8_603], [1.5_808, 1.8_004, -0.9_353], [1.6_043, 1.7_495, -0.5_999]]).to(_A)
					self.assertTrue(
					    torch.allclose(
					        outputs.transformer_decoder_last_hidden_state[0, :3, :3]			,						_A			,						atol=_A))



				def       _lowercase  (self       :   str)					->			Any:
					__snake_case    :							int   	=				MaskaFormerForUniversalSegmentation.from_pretrained(self.model_checkpoints).to(_A).eval()
					__snake_case    :							Dict   	=				self.default_image_processor
					__snake_case    :							Optional[int]   	=				prepare_img()
					__snake_case    :							int   	=				image_processor(_A			,						return_tensors='pt').to(_A)
					__snake_case    :							str   	=				inputs['pixel_values'].shape
					# check size is divisible by 32
					self.assertTrue((inputs_shape[-1] % 32) == 0 and (inputs_shape[-2] % 32) == 0)
					# check size
					self.assertEqual(_A			,						(1, 3, 3_84, 3_84))

					with torch.no_grad():
						__snake_case    :							List[str]   	=				model(**_A)
					# masks_queries_logits
					__snake_case    :							List[str]   	=				outputs.masks_queries_logits
					self.assertEqual(
					    masks_queries_logits.shape			,						(1, model.config.num_queries, inputs_shape[-2] // 4, inputs_shape[-1] // 4))
					__snake_case    :							Any   	=				[
					    [-8.7_839, -9.0_056, -8.8_121],
					    [-7.4_104, -7.0_313, -6.5_401],
					    [-6.6_105, -6.3_427, -6.4_675],
					]
					__snake_case    :							str   	=				torch.tensor(_A).to(_A)
					self.assertTrue(torch.allclose(masks_queries_logits[0, 0, :3, :3]			,						_A			,						atol=_A))
					# class_queries_logits
					__snake_case    :							int   	=				outputs.class_queries_logits
					self.assertEqual(class_queries_logits.shape			,						(1, model.config.num_queries, model.config.num_labels + 1))
					__snake_case    :							Union[str, Any]   	=				torch.tensor(
					    [
					        [1.8_324, -8.0_835, -4.1_922],
					        [0.8_450, -9.0_050, -3.6_053],
					        [0.3_045, -7.7_293, -3.0_275],
					    ]).to(_A)
					self.assertTrue(torch.allclose(outputs.class_queries_logits[0, :3, :3]			,						_A			,						atol=_A))






				def       _lowercase  (self       :   Optional[Any])					->			Dict:
					__snake_case    :							Optional[int]   	=				MaskaFormerForUniversalSegmentation.from_pretrained(self.model_checkpoints).to(_A).eval()
					__snake_case    :							Tuple   	=				self.default_image_processor

					__snake_case    :							Optional[Any]   	=				image_processor(
					    [np.zeros((3, 8_00, 13_33)), np.zeros((3, 8_00, 13_33))]			,						segmentation_maps=[np.zeros((3_84, 3_84)).astype(np.floataa), np.zeros((3_84, 3_84)).astype(np.floataa)]			,						return_tensors='pt'			,						)

					__snake_case    :							Optional[int]   	=				inputs['pixel_values'].to(_A)
					__snake_case    :							Tuple   	=				[el.to(_A) for el in inputs['mask_labels']]
					__snake_case    :							Tuple   	=				[el.to(_A) for el in inputs['class_labels']]

					with torch.no_grad():
						__snake_case    :							List[Any]   	=				model(**_A)

					self.assertTrue(outputs.loss is not None)






"""simple docstring"""







import unittest

from transformers.models.xlm_prophetnet.tokenization_xlm_prophetnet import SPIECE_UNDERLINE, XLMProphetNetTokenizer
from transformers.testing_utils import get_tests_dir, require_sentencepiece, slow
from transformers.utils import cached_property

from ...test_tokenization_common import TokenizerTesterMixin


_a  :  Optional[int]=				get_tests_dir("fixtures/test_sentencepiece.model")

@require_sentencepiece
class 	UpperCamelCase    (					lowercase   ,			unittest.TestCase		):
				UpperCAmelCase       :   List[str]					=	XLMProphetNetTokenizer
				UpperCAmelCase       :   int					=	False
				UpperCAmelCase       :   List[Any]					=	True



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

					# We have a SentencePiece fixture for testing
					__snake_case    :							Tuple   	=				XLMProphetNetTokenizer(_A			,						keep_accents=_A)
					tokenizer.save_pretrained(self.tmpdirname)



				def       _lowercase  (self       :   str)					->			Optional[int]:
					__snake_case    :							List[str]   	=				'[PAD]'
					__snake_case    :							str   	=				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       :   Dict)					->			str:
					__snake_case    :							int   	=				list(self.get_tokenizer().get_vocab().keys())

					self.assertEqual(vocab_keys[0]			,						'[PAD]')
					self.assertEqual(vocab_keys[1]			,						'[CLS]')
					self.assertEqual(vocab_keys[-1]			,						'j')
					self.assertEqual(len(_A)			,						10_12)



				def       _lowercase  (self       :   Dict)					->			List[str]:
					self.assertEqual(self.get_tokenizer().vocab_size			,						10_12)



				def       _lowercase  (self       :   str)					->			Dict:
					__snake_case    :							int   	=				XLMProphetNetTokenizer(_A			,						keep_accents=_A)

					__snake_case    :							Tuple   	=				tokenizer.tokenize('This is a test')
					self.assertListEqual(_A			,						['▁This', '▁is', '▁a', '▁t', 'est'])

					self.assertListEqual(
					    tokenizer.convert_tokens_to_ids(_A)			,						[value + tokenizer.fairseq_offset for value in [2_85, 46, 10, 1_70, 3_82]]			,						)

					__snake_case    :							int   	=				tokenizer.tokenize('I was born in 92000, and this is falsé.')
					self.assertListEqual(
					    _A			,						[
					        SPIECE_UNDERLINE + 'I',
					        SPIECE_UNDERLINE + 'was',
					        SPIECE_UNDERLINE + 'b',
					        'or',
					        'n',
					        SPIECE_UNDERLINE + 'in',
					        SPIECE_UNDERLINE + '',
					        '9',
					        '2',
					        '0',
					        '0',
					        '0',
					        ',',
					        SPIECE_UNDERLINE + 'and',
					        SPIECE_UNDERLINE + 'this',
					        SPIECE_UNDERLINE + 'is',
					        SPIECE_UNDERLINE + 'f',
					        'al',
					        's',
					        'é',
					        '.',
					    ]			,						)
					__snake_case    :							Tuple   	=				tokenizer.convert_tokens_to_ids(_A)
					self.assertListEqual(
					    _A			,						[
					        value + tokenizer.fairseq_offset
					        for value in [8, 21, 84, 55, 24, 19, 7, -9, 6_02, 3_47, 3_47, 3_47, 3, 12, 66, 46, 72, 80, 6, -9, 4]
					    ]			,						)

					__snake_case    :							Optional[Any]   	=				tokenizer.convert_ids_to_tokens(_A)
					self.assertListEqual(
					    _A			,						[
					        SPIECE_UNDERLINE + 'I',
					        SPIECE_UNDERLINE + 'was',
					        SPIECE_UNDERLINE + 'b',
					        'or',
					        'n',
					        SPIECE_UNDERLINE + 'in',
					        SPIECE_UNDERLINE + '',
					        '[UNK]',
					        '2',
					        '0',
					        '0',
					        '0',
					        ',',
					        SPIECE_UNDERLINE + 'and',
					        SPIECE_UNDERLINE + 'this',
					        SPIECE_UNDERLINE + 'is',
					        SPIECE_UNDERLINE + 'f',
					        'al',
					        's',
					        '[UNK]',
					        '.',
					    ]			,						)



				@cached_property
				def       _lowercase  (self       :   List[Any])					->			Tuple:
					return XLMProphetNetTokenizer.from_pretrained('microsoft/xprophetnet-large-wiki100-cased')



				@slow
				def       _lowercase  (self       :   Tuple)					->			Any:
					__snake_case    :							Dict   	=				'Hello World!'
					__snake_case    :							List[str]   	=				[3_53_89, 66_72, 49, 2]
					self.assertListEqual(_A			,						self.big_tokenizer.encode(_A))






				@slow
				def       _lowercase  (self       :   Union[str, Any])					->			List[Any]:
					# fmt: off
					__snake_case    :							Any   	=				{'input_ids': [[1_10_73, 8_27_83, 18, 26, 8_27_83, 5_49, 5_15_40, 2_48, 1_72_09, 13_01, 2_17, 20, 21_51_86, 13_25, 1_47, 1_72_09, 13_01, 2_17, 20, 5_63_70, 53, 12_20_20, 20, 1_64_77, 27, 8_73_55, 45_48, 20, 47_28, 7_83_92, 17, 15_99_69, 18, 26, 2_44_91, 6_29, 15, 5_38, 2_27_04, 54_39, 15, 27_88, 2_44_91, 98_85, 15, 4_35_34, 6_05, 15, 8_14, 1_84_03, 3_32_00, 29, 15, 4_35_34, 2_44_58, 1_24_10, 1_11, 2_49_66, 8_36_69, 96_37, 14_40_68, 26, 8_50, 2_23_46, 27, 1_47, 2_49_66, 8_36_69, 8_34_90, 26, 3_91_13, 7_35, 27, 6_89, 6_56, 28_00, 13_39, 46_00, 53, 12_20_20, 11_57_85, 34, 8_16, 13_39, 4_68_87, 18, 1_47, 5_39_05, 19_51, 4_22_38, 4_11_70, 1_77_32, 8_34, 4_36, 15, 2_75_23, 9_87_33, 2_17, 1_47, 55_42, 49_81, 9_30, 1_73_47, 16, 2], [2_00_91, 6_29, 94, 8_27_86, 58, 4_90, 20, 15_28, 84, 5_39_05, 3_44, 8_05_92, 11_01_28, 1_88_22, 52_67, 13_06, 62, 15_25_37, 3_08, 79_97, 4_01, 12_44_27, 5_49, 3_54_42, 2_25, 1_09, 1_50_55, 2_57_48, 1_47, 71_19, 4_37_12, 34, 7_67, 13_53_66, 18, 16, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [5_92, 6_37_84, 11_94_66, 17, 14_78_08, 8_82_14, 18, 6_56, 81, 32, 32_96, 1_02_80, 16, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], '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, 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], [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, 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='microsoft/xprophetnet-large-wiki100-cased'			,						revision='1acad1643ddd54a44df6a1b797ada8373685d90e'			,						)





