from __future__ import annotations

import inspect
import unittest
from typing import List, Tuple

from transformers import RegNetConfig
from transformers.testing_utils import require_tf, require_vision, slow
from transformers.utils import cached_property, is_tf_available, is_vision_available

from ...test_configuration_common import ConfigTester
from ...test_modeling_tf_common import TFModelTesterMixin, floats_tensor, ids_tensor
from ...test_pipeline_mixin import PipelineTesterMixin


if is_tf_available():
       import tensorflow as tf

       from transformers import TF_REGNET_PRETRAINED_MODEL_ARCHIVE_LIST, TFRegNetForImageClassification, TFRegNetModel


if is_vision_available():
       from PIL import Image

       from transformers import AutoImageProcessor


class       UpperCAmelCase__     :



  """simple docstring"""






  def __init__(					self:      Optional[Any]					,					__lowerCAmelCase:      Optional[Any]					,					__lowerCAmelCase:      Dict=3					,					__lowerCAmelCase:      List[str]=32					,					__lowerCAmelCase:      Union[str, Any]=3					,					__lowerCAmelCase:      List[str]=10					,					__lowerCAmelCase:      Tuple=[10, 20, 30, 40]					,					__lowerCAmelCase:      int=[1, 1, 2, 1]					,					__lowerCAmelCase:      Tuple=True					,					__lowerCAmelCase:      int=True					,					__lowerCAmelCase:      Optional[int]="relu"					,					__lowerCAmelCase:      Optional[int]=3					,					__lowerCAmelCase:      Tuple=None					,					)			->			Optional[Any]:




    '''simple docstring'''




    __UpperCAmelCase         =							parent
    __UpperCAmelCase         =							batch_size
    __UpperCAmelCase         =							image_size
    __UpperCAmelCase         =							num_channels
    __UpperCAmelCase         =							embeddings_size
    __UpperCAmelCase         =							hidden_sizes
    __UpperCAmelCase         =							depths
    __UpperCAmelCase         =							is_training
    __UpperCAmelCase         =							use_labels
    __UpperCAmelCase         =							hidden_act
    __UpperCAmelCase         =							num_labels
    __UpperCAmelCase         =							scope
    __UpperCAmelCase         =							len(__SCREAMING_SNAKE_CASE )






  def 						_UpperCAmelCase					(					self:      Union[str, Any] )			->			Tuple:




    '''simple docstring'''




    __UpperCAmelCase         =							floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size] )

    __UpperCAmelCase         =							None
    if self.use_labels:
      __UpperCAmelCase         =							ids_tensor([self.batch_size]					,					self.num_labels )

    __UpperCAmelCase         =							self.get_config()
    return config, pixel_values, labels






  def 						_UpperCAmelCase					(					self:      Dict )			->			Any:




    '''simple docstring'''




    return RegNetConfig(
        num_channels=self.num_channels					,					embeddings_size=self.embeddings_size					,					hidden_sizes=self.hidden_sizes					,					depths=self.depths					,					hidden_act=self.hidden_act					,					num_labels=self.num_labels					,					)






  def 						_UpperCAmelCase					(					self:      List[str]					,					__lowerCAmelCase:      Union[str, Any]					,					__lowerCAmelCase:      Dict					,					__lowerCAmelCase:      List[Any] )			->			List[str]:




    '''simple docstring'''




    __UpperCAmelCase         =							TFRegNetModel(config=__SCREAMING_SNAKE_CASE )
    __UpperCAmelCase         =							model(__SCREAMING_SNAKE_CASE					,					training=__SCREAMING_SNAKE_CASE )
    # expected last hidden states: B, C, H // 32, W // 32
    self.parent.assertEqual(
        result.last_hidden_state.shape					,					(self.batch_size, self.hidden_sizes[-1], self.image_size // 32, self.image_size // 32)					,					)






  def 						_UpperCAmelCase					(					self:      Tuple					,					__lowerCAmelCase:      Union[str, Any]					,					__lowerCAmelCase:      Optional[int]					,					__lowerCAmelCase:      Dict )			->			int:




    '''simple docstring'''




    __UpperCAmelCase         =							self.num_labels
    __UpperCAmelCase         =							TFRegNetForImageClassification(__SCREAMING_SNAKE_CASE )
    __UpperCAmelCase         =							model(__SCREAMING_SNAKE_CASE					,					labels=__SCREAMING_SNAKE_CASE					,					training=__SCREAMING_SNAKE_CASE )
    self.parent.assertEqual(result.logits.shape					,					(self.batch_size, self.num_labels) )






  def 						_UpperCAmelCase					(					self:      List[Any] )			->			int:




    '''simple docstring'''




    __UpperCAmelCase         =							self.prepare_config_and_inputs()
    __UpperCAmelCase     ,		__UpperCAmelCase     ,		__UpperCAmelCase         =							config_and_inputs
    __UpperCAmelCase         =							{"pixel_values": pixel_values}
    return config, inputs_dict






@require_tf
class       UpperCAmelCase__     (		snake_case		,						snake_case		,						unittest.TestCase       ):



  """simple docstring"""






  lowerCAmelCase__		:						Optional[int]     		=			(TFRegNetModel, TFRegNetForImageClassification) if is_tf_available() else ()
  lowerCAmelCase__		:						Any     		=			(
      {'feature-extraction': TFRegNetModel, 'image-classification': TFRegNetForImageClassification}
      if is_tf_available()
      else {}
  )

  lowerCAmelCase__		:						Tuple     		=			False
  lowerCAmelCase__		:						Optional[int]     		=			False
  lowerCAmelCase__		:						int     		=			False
  lowerCAmelCase__		:						Union[str, Any]     		=			False
  lowerCAmelCase__		:						Dict     		=			False






  def 						_UpperCAmelCase					(					self:      List[str] )			->			Tuple:




    '''simple docstring'''




    __UpperCAmelCase         =							TFRegNetModelTester(self )
    __UpperCAmelCase         =							ConfigTester(self					,					config_class=__SCREAMING_SNAKE_CASE					,					has_text_modality=__SCREAMING_SNAKE_CASE )






  def 						_UpperCAmelCase					(					self:      int )			->			Optional[int]:




    '''simple docstring'''




    return






  @unittest.skip(reason="RegNet does not use inputs_embeds" )
  def 						_UpperCAmelCase					(					self:      Dict )			->			Optional[Any]:




    '''simple docstring'''




    pass






  @unittest.skipIf(
      not is_tf_available() or len(tf.config.list_physical_devices("GPU" ) ) == 0					,					reason="TF does not support backprop for grouped convolutions on CPU."					,					)
  @slow
  def 						_UpperCAmelCase					(					self:      Optional[Any] )			->			Any:




    '''simple docstring'''




    super().test_keras_fit()






  @unittest.skip(reason="RegNet does not support input and output embeddings" )
  def 						_UpperCAmelCase					(					self:      List[str] )			->			Dict:




    '''simple docstring'''




    pass






  def 						_UpperCAmelCase					(					self:      str )			->			List[str]:




    '''simple docstring'''




    __UpperCAmelCase     ,		__UpperCAmelCase         =							self.model_tester.prepare_config_and_inputs_for_common()

    for model_class in self.all_model_classes:
      __UpperCAmelCase         =							model_class(__SCREAMING_SNAKE_CASE )
      __UpperCAmelCase         =							inspect.signature(model.call )
      # signature.parameters is an OrderedDict => so arg_names order is deterministic
      __UpperCAmelCase         =							[*signature.parameters.keys()]

      __UpperCAmelCase         =							["pixel_values"]
      self.assertListEqual(arg_names[:1]					,					__SCREAMING_SNAKE_CASE )






  def 						_UpperCAmelCase					(					self:      Any )			->			str:




    '''simple docstring'''




    __UpperCAmelCase         =							self.model_tester.prepare_config_and_inputs()
    self.model_tester.create_and_check_model(*__SCREAMING_SNAKE_CASE )






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




    '''simple docstring'''




    def check_hidden_states_output(__lowerCAmelCase:      Any					,					__lowerCAmelCase:      Union[str, Any]					,					__lowerCAmelCase:      Tuple ):
      __UpperCAmelCase         =							model_class(__SCREAMING_SNAKE_CASE )
      __UpperCAmelCase         =							model(**self._prepare_for_class(__SCREAMING_SNAKE_CASE					,					__SCREAMING_SNAKE_CASE )					,					training=__SCREAMING_SNAKE_CASE )

      __UpperCAmelCase         =							outputs.encoder_hidden_states if config.is_encoder_decoder else outputs.hidden_states

      __UpperCAmelCase         =							self.model_tester.num_stages
      self.assertEqual(len(__SCREAMING_SNAKE_CASE )					,					expected_num_stages + 1 )

      # RegNet's feature maps are of shape (batch_size, num_channels, height, width)
      self.assertListEqual(
          list(hidden_states[0].shape[-2:] )					,					[self.model_tester.image_size // 2, self.model_tester.image_size // 2]					,					)

    __UpperCAmelCase     ,		__UpperCAmelCase         =							self.model_tester.prepare_config_and_inputs_for_common()
    __UpperCAmelCase         =							["basic", "bottleneck"]
    for model_class in self.all_model_classes:
      for layer_type in layers_type:
        __UpperCAmelCase         =							layer_type
        __UpperCAmelCase         =							True
        check_hidden_states_output(__SCREAMING_SNAKE_CASE					,					__SCREAMING_SNAKE_CASE					,					__SCREAMING_SNAKE_CASE )

        # check that output_hidden_states also work using config
        del inputs_dict["output_hidden_states"]
        __UpperCAmelCase         =							True

        check_hidden_states_output(__SCREAMING_SNAKE_CASE					,					__SCREAMING_SNAKE_CASE					,					__SCREAMING_SNAKE_CASE )






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




    '''simple docstring'''




    __UpperCAmelCase     ,		__UpperCAmelCase         =							self.model_tester.prepare_config_and_inputs_for_common()

    def check_equivalence(__lowerCAmelCase:      Optional[int]					,					__lowerCAmelCase:      Tuple					,					__lowerCAmelCase:      Optional[Any]					,					__lowerCAmelCase:      Tuple={} ):
      __UpperCAmelCase         =							model(__SCREAMING_SNAKE_CASE					,					return_dict=__SCREAMING_SNAKE_CASE					,					**__SCREAMING_SNAKE_CASE )
      __UpperCAmelCase         =							model(__SCREAMING_SNAKE_CASE					,					return_dict=__SCREAMING_SNAKE_CASE					,					**__SCREAMING_SNAKE_CASE ).to_tuple()

      def recursive_check(__lowerCAmelCase:      int					,					__lowerCAmelCase:      Optional[int] ):
        if isinstance(__SCREAMING_SNAKE_CASE					,					(List, Tuple) ):
          for tuple_iterable_value, dict_iterable_value in zip(__SCREAMING_SNAKE_CASE					,					__SCREAMING_SNAKE_CASE ):
            recursive_check(__SCREAMING_SNAKE_CASE					,					__SCREAMING_SNAKE_CASE )
        elif tuple_object is None:
          return
        else:
          self.assertTrue(
              all(tf.equal(__SCREAMING_SNAKE_CASE					,					__SCREAMING_SNAKE_CASE ) )					,					msg=(
                  "Tuple and dict output are not equal. Difference:"
                  F''' {tf.math.reduce_max(tf.abs(tuple_object - dict_object ) )}'''
              )					,					)

        recursive_check(__SCREAMING_SNAKE_CASE					,					__SCREAMING_SNAKE_CASE )

    for model_class in self.all_model_classes:
      __UpperCAmelCase         =							model_class(__SCREAMING_SNAKE_CASE )

      __UpperCAmelCase         =							self._prepare_for_class(__SCREAMING_SNAKE_CASE					,					__SCREAMING_SNAKE_CASE )
      __UpperCAmelCase         =							self._prepare_for_class(__SCREAMING_SNAKE_CASE					,					__SCREAMING_SNAKE_CASE )
      check_equivalence(__SCREAMING_SNAKE_CASE					,					__SCREAMING_SNAKE_CASE					,					__SCREAMING_SNAKE_CASE )

      __UpperCAmelCase         =							self._prepare_for_class(__SCREAMING_SNAKE_CASE					,					__SCREAMING_SNAKE_CASE					,					return_labels=__SCREAMING_SNAKE_CASE )
      __UpperCAmelCase         =							self._prepare_for_class(__SCREAMING_SNAKE_CASE					,					__SCREAMING_SNAKE_CASE					,					return_labels=__SCREAMING_SNAKE_CASE )
      check_equivalence(__SCREAMING_SNAKE_CASE					,					__SCREAMING_SNAKE_CASE					,					__SCREAMING_SNAKE_CASE )

      __UpperCAmelCase         =							self._prepare_for_class(__SCREAMING_SNAKE_CASE					,					__SCREAMING_SNAKE_CASE )
      __UpperCAmelCase         =							self._prepare_for_class(__SCREAMING_SNAKE_CASE					,					__SCREAMING_SNAKE_CASE )
      check_equivalence(__SCREAMING_SNAKE_CASE					,					__SCREAMING_SNAKE_CASE					,					__SCREAMING_SNAKE_CASE					,					{"output_hidden_states": True} )

      __UpperCAmelCase         =							self._prepare_for_class(__SCREAMING_SNAKE_CASE					,					__SCREAMING_SNAKE_CASE					,					return_labels=__SCREAMING_SNAKE_CASE )
      __UpperCAmelCase         =							self._prepare_for_class(__SCREAMING_SNAKE_CASE					,					__SCREAMING_SNAKE_CASE					,					return_labels=__SCREAMING_SNAKE_CASE )
      check_equivalence(__SCREAMING_SNAKE_CASE					,					__SCREAMING_SNAKE_CASE					,					__SCREAMING_SNAKE_CASE					,					{"output_hidden_states": True} )






  def 						_UpperCAmelCase					(					self:      Any )			->			int:




    '''simple docstring'''




    __UpperCAmelCase         =							self.model_tester.prepare_config_and_inputs()
    self.model_tester.create_and_check_for_image_classification(*__SCREAMING_SNAKE_CASE )






  @slow
  def 						_UpperCAmelCase					(					self:      List[str] )			->			Any:




    '''simple docstring'''




    for model_name in TF_REGNET_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
      __UpperCAmelCase         =							TFRegNetModel.from_pretrained(__SCREAMING_SNAKE_CASE )
      self.assertIsNotNone(__SCREAMING_SNAKE_CASE )






def    __lowerCAmelCase   (    )     ->	Any:
  __UpperCAmelCase         =							Image.open("./tests/fixtures/tests_samples/COCO/000000039769.png"       )
  return image





@require_tf
@require_vision
class       UpperCAmelCase__     (		unittest.TestCase       ):



  """simple docstring"""






  @cached_property
  def 						_UpperCAmelCase					(					self:      Optional[Any] )			->			str:




    '''simple docstring'''




    return (
        AutoImageProcessor.from_pretrained(TF_REGNET_PRETRAINED_MODEL_ARCHIVE_LIST[0] )
        if is_vision_available()
        else None
    )






  @slow
  def 						_UpperCAmelCase					(					self:      Optional[int] )			->			str:




    '''simple docstring'''




    __UpperCAmelCase         =							TFRegNetForImageClassification.from_pretrained(TF_REGNET_PRETRAINED_MODEL_ARCHIVE_LIST[0] )

    __UpperCAmelCase         =							self.default_image_processor
    __UpperCAmelCase         =							prepare_img()
    __UpperCAmelCase         =							image_processor(images=__SCREAMING_SNAKE_CASE					,					return_tensors="tf" )

    # forward pass
    __UpperCAmelCase         =							model(**__SCREAMING_SNAKE_CASE					,					training=__SCREAMING_SNAKE_CASE )

    # verify the logits
    __UpperCAmelCase         =							tf.TensorShape((1, 1_000) )
    self.assertEqual(outputs.logits.shape					,					__SCREAMING_SNAKE_CASE )

    __UpperCAmelCase         =							tf.constant([-0.4180, -1.5051, -3.4836] )

    tf.debugging.assert_near(outputs.logits[0, :3]					,					__SCREAMING_SNAKE_CASE					,					atol=1E-4 )






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


UpperCAmelCase					:			int       =	get_tests_dir('fixtures/test_sentencepiece.model')







@require_sentencepiece
class 		lowerCAmelCase__  ( a					,   unittest.TestCase   ):



 """simple docstring"""



 lowerCAmelCase__       = XLMProphetNetTokenizer
 lowerCAmelCase__       = False
 lowerCAmelCase__       = True
 def  UpperCAmelCase__						(						self   :			str     )    ->					Optional[int]:


      """simple docstring"""




      super().setUp()

      # We have a SentencePiece fixture for testing
      __SCREAMING_SNAKE_CASE      = XLMProphetNetTokenizer(__SCREAMING_SNAKE_CASE   ,				keep_accents=__SCREAMING_SNAKE_CASE     )
      tokenizer.save_pretrained(self.tmpdirname     )
 def  UpperCAmelCase__						(						self   :			Dict     )    ->					Tuple:


      """simple docstring"""




      __SCREAMING_SNAKE_CASE      = """[PAD]"""
      __SCREAMING_SNAKE_CASE      = 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  UpperCAmelCase__						(						self   :			Tuple     )    ->					Optional[int]:


      """simple docstring"""




      __SCREAMING_SNAKE_CASE      = 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(__SCREAMING_SNAKE_CASE     )   ,				1_012     )
 def  UpperCAmelCase__						(						self   :			Any     )    ->					List[str]:


      """simple docstring"""




      self.assertEqual(self.get_tokenizer().vocab_size   ,				1_012     )
 def  UpperCAmelCase__						(						self   :			int     )    ->					List[Any]:


      """simple docstring"""




      __SCREAMING_SNAKE_CASE      = XLMProphetNetTokenizer(__SCREAMING_SNAKE_CASE   ,				keep_accents=__SCREAMING_SNAKE_CASE     )

      __SCREAMING_SNAKE_CASE      = tokenizer.tokenize("""This is a test"""     )
      self.assertListEqual(__SCREAMING_SNAKE_CASE   ,				["""▁This""", """▁is""", """▁a""", """▁t""", """est"""]     )

      self.assertListEqual(
          tokenizer.convert_tokens_to_ids(__SCREAMING_SNAKE_CASE     )   ,				[value + tokenizer.fairseq_offset for value in [285, 46, 10, 170, 382]]   ,				)

      __SCREAMING_SNAKE_CASE      = tokenizer.tokenize("""I was born in 92000, and this is falsé."""     )
      self.assertListEqual(
          __SCREAMING_SNAKE_CASE   ,				[
              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""",
              """é""",
              """.""",
          ]   ,				)
      __SCREAMING_SNAKE_CASE      = tokenizer.convert_tokens_to_ids(__SCREAMING_SNAKE_CASE     )
      self.assertListEqual(
          __SCREAMING_SNAKE_CASE   ,				[
              value + tokenizer.fairseq_offset
              for value in [8, 21, 84, 55, 24, 19, 7, -9, 602, 347, 347, 347, 3, 12, 66, 46, 72, 80, 6, -9, 4]
          ]   ,				)

      __SCREAMING_SNAKE_CASE      = tokenizer.convert_ids_to_tokens(__SCREAMING_SNAKE_CASE     )
      self.assertListEqual(
          __SCREAMING_SNAKE_CASE   ,				[
              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  UpperCAmelCase__						(						self   :			str     )    ->					str:


      """simple docstring"""




      return XLMProphetNetTokenizer.from_pretrained("""microsoft/xprophetnet-large-wiki100-cased"""     )
 @slow
 def  UpperCAmelCase__						(						self   :			Dict     )    ->					Optional[Any]:


      """simple docstring"""




      __SCREAMING_SNAKE_CASE      = """Hello World!"""
      __SCREAMING_SNAKE_CASE      = [35_389, 6_672, 49, 2]
      self.assertListEqual(__SCREAMING_SNAKE_CASE   ,				self.big_tokenizer.encode(__SCREAMING_SNAKE_CASE     )     )


 @slow
 def  UpperCAmelCase__						(						self   :			Dict     )    ->					str:


      """simple docstring"""




      __SCREAMING_SNAKE_CASE      = {"""input_ids""": [[11_073, 82_783, 18, 26, 82_783, 549, 51_540, 248, 17_209, 1_301, 217, 20, 215_186, 1_325, 147, 17_209, 1_301, 217, 20, 56_370, 53, 122_020, 20, 16_477, 27, 87_355, 4_548, 20, 4_728, 78_392, 17, 159_969, 18, 26, 24_491, 629, 15, 538, 22_704, 5_439, 15, 2_788, 24_491, 9_885, 15, 43_534, 605, 15, 814, 18_403, 33_200, 29, 15, 43_534, 24_458, 12_410, 111, 24_966, 83_669, 9_637, 144_068, 26, 850, 22_346, 27, 147, 24_966, 83_669, 83_490, 26, 39_113, 735, 27, 689, 656, 2_800, 1_339, 4_600, 53, 122_020, 115_785, 34, 816, 1_339, 46_887, 18, 147, 53_905, 1_951, 42_238, 41_170, 17_732, 834, 436, 15, 27_523, 98_733, 217, 147, 5_542, 4_981, 930, 17_347, 16, 2], [20_091, 629, 94, 82_786, 58, 490, 20, 1_528, 84, 53_905, 344, 80_592, 110_128, 18_822, 5_267, 1_306, 62, 152_537, 308, 7_997, 401, 124_427, 549, 35_442, 225, 109, 15_055, 25_748, 147, 7_119, 43_712, 34, 767, 135_366, 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], [592, 63_784, 119_466, 17, 147_808, 88_214, 18, 656, 81, 32, 3_296, 10_280, 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=__SCREAMING_SNAKE_CASE   ,				model_name="""microsoft/xprophetnet-large-wiki100-cased"""   ,				revision="""1acad1643ddd54a44df6a1b797ada8373685d90e"""   ,				)






