import unittest

from transformers import ElectraConfig, is_torch_available
from transformers.models.auto import get_values
from transformers.testing_utils import require_torch, slow, torch_device

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, floats_tensor, ids_tensor, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
     import torch

     from transformers import (
         MODEL_FOR_PRETRAINING_MAPPING,
         ElectraForCausalLM,
         ElectraForMaskedLM,
         ElectraForMultipleChoice,
         ElectraForPreTraining,
         ElectraForQuestionAnswering,
         ElectraForSequenceClassification,
         ElectraForTokenClassification,
         ElectraModel,
     )
     from transformers.models.electra.modeling_electra import ELECTRA_PRETRAINED_MODEL_ARCHIVE_LIST







class       __snake_case :
 def __init__(	self		, snake_case__		, snake_case__=13		, snake_case__=7		, snake_case__=True		, snake_case__=True		, snake_case__=True		, snake_case__=True		, snake_case__=99		, snake_case__=32		, snake_case__=5		, snake_case__=4		, snake_case__=37		, snake_case__="gelu"		, snake_case__=0.1		, snake_case__=0.1		, snake_case__=512		, snake_case__=16		, snake_case__=2		, snake_case__=0.02		, snake_case__=3		, snake_case__=4		, snake_case__=None		, )						->				Any:
       '''simple docstring'''





       UpperCAmelCase     :			Any     	=parent
       UpperCAmelCase     :			List[Any]     	=batch_size
       UpperCAmelCase     :			str     	=seq_length
       UpperCAmelCase     :			List[Any]     	=is_training
       UpperCAmelCase     :			List[str]     	=use_input_mask
       UpperCAmelCase     :			Optional[Any]     	=use_token_type_ids
       UpperCAmelCase     :			Any     	=use_labels
       UpperCAmelCase     :			Tuple     	=vocab_size
       UpperCAmelCase     :			int     	=hidden_size
       UpperCAmelCase     :			Optional[Any]     	=num_hidden_layers
       UpperCAmelCase     :			Union[str, Any]     	=num_attention_heads
       UpperCAmelCase     :			Union[str, Any]     	=intermediate_size
       UpperCAmelCase     :			Optional[Any]     	=hidden_act
       UpperCAmelCase     :			List[Any]     	=hidden_dropout_prob
       UpperCAmelCase     :			Tuple     	=attention_probs_dropout_prob
       UpperCAmelCase     :			List[Any]     	=max_position_embeddings
       UpperCAmelCase     :			Tuple     	=type_vocab_size
       UpperCAmelCase     :			Optional[Any]     	=type_sequence_label_size
       UpperCAmelCase     :			Any     	=initializer_range
       UpperCAmelCase     :			Optional[Any]     	=num_labels
       UpperCAmelCase     :			Optional[Any]     	=num_choices
       UpperCAmelCase     :			List[str]     	=scope
 def 						UpperCAmelCase__							(	self    )						->				str:
       '''simple docstring'''





       UpperCAmelCase     :			int     	=ids_tensor([self.batch_size, self.seq_length]		, self.vocab_size    )

       UpperCAmelCase     :			List[Any]     	=None
       if self.use_input_mask:
             UpperCAmelCase     :			Tuple     	=random_attention_mask([self.batch_size, self.seq_length]    )

       UpperCAmelCase     :			Any     	=None
       if self.use_token_type_ids:
             UpperCAmelCase     :			List[str]     	=ids_tensor([self.batch_size, self.seq_length]		, self.type_vocab_size    )

       UpperCAmelCase     :			Optional[Any]     	=None
       UpperCAmelCase     :			Optional[int]     	=None
       UpperCAmelCase     :			List[str]     	=None
       if self.use_labels:
             UpperCAmelCase     :			str     	=ids_tensor([self.batch_size]		, self.type_sequence_label_size    )
             UpperCAmelCase     :			str     	=ids_tensor([self.batch_size, self.seq_length]		, self.num_labels    )
             UpperCAmelCase     :			Optional[Any]     	=ids_tensor([self.batch_size]		, self.num_choices    )
             UpperCAmelCase     :			Optional[Any]     	=ids_tensor([self.batch_size, self.seq_length]		, 1    )

       UpperCAmelCase     :			Optional[Any]     	=self.get_config()

       return (
           config,
           input_ids,
           token_type_ids,
           input_mask,
           sequence_labels,
           token_labels,
           choice_labels,
           fake_token_labels,
       )
 def 						UpperCAmelCase__							(	self    )						->				int:
       '''simple docstring'''





       return ElectraConfig(
           vocab_size=self.vocab_size		, hidden_size=self.hidden_size		, num_hidden_layers=self.num_hidden_layers		, num_attention_heads=self.num_attention_heads		, intermediate_size=self.intermediate_size		, hidden_act=self.hidden_act		, hidden_dropout_prob=self.hidden_dropout_prob		, attention_probs_dropout_prob=self.attention_probs_dropout_prob		, max_position_embeddings=self.max_position_embeddings		, type_vocab_size=self.type_vocab_size		, is_decoder=snake_case__		, initializer_range=self.initializer_range		, )
 def 						UpperCAmelCase__							(	self    )						->				List[Any]:
       '''simple docstring'''





       (
           (
           UpperCAmelCase
       )	,    (
           UpperCAmelCase
       )	,    (
           UpperCAmelCase
       )	,    (
           UpperCAmelCase
       )	,    (
           UpperCAmelCase
       )	,    (
           UpperCAmelCase
       )	,    (
           UpperCAmelCase
       )	,    (
           UpperCAmelCase
       )	,    
       )     :			List[str]     	=self.prepare_config_and_inputs()

       UpperCAmelCase     :			Tuple     	=True
       UpperCAmelCase     :			Union[str, Any]     	=floats_tensor([self.batch_size, self.seq_length, self.hidden_size]    )
       UpperCAmelCase     :			Optional[Any]     	=ids_tensor([self.batch_size, self.seq_length]		, vocab_size=2    )

       return (
           config,
           input_ids,
           token_type_ids,
           input_mask,
           sequence_labels,
           token_labels,
           choice_labels,
           encoder_hidden_states,
           encoder_attention_mask,
       )
 def 						UpperCAmelCase__							(	self		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, )						->				Any:
       '''simple docstring'''





       UpperCAmelCase     :			Tuple     	=ElectraModel(config=snake_case__    )
       model.to(snake_case__    )
       model.eval()
       UpperCAmelCase     :			str     	=model(snake_case__		, attention_mask=snake_case__		, token_type_ids=snake_case__    )
       UpperCAmelCase     :			int     	=model(snake_case__		, token_type_ids=snake_case__    )
       UpperCAmelCase     :			Any     	=model(snake_case__    )
       self.parent.assertEqual(result.last_hidden_state.shape		, (self.batch_size, self.seq_length, self.hidden_size)    )
 def 						UpperCAmelCase__							(	self		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, )						->				Tuple:
       '''simple docstring'''





       UpperCAmelCase     :			Optional[int]     	=True
       UpperCAmelCase     :			Union[str, Any]     	=ElectraModel(snake_case__    )
       model.to(snake_case__    )
       model.eval()
       UpperCAmelCase     :			Tuple     	=model(
           snake_case__		, attention_mask=snake_case__		, token_type_ids=snake_case__		, encoder_hidden_states=snake_case__		, encoder_attention_mask=snake_case__		, )
       UpperCAmelCase     :			Any     	=model(
           snake_case__		, attention_mask=snake_case__		, token_type_ids=snake_case__		, encoder_hidden_states=snake_case__		, )
       UpperCAmelCase     :			Dict     	=model(snake_case__		, attention_mask=snake_case__		, token_type_ids=snake_case__    )
       self.parent.assertEqual(result.last_hidden_state.shape		, (self.batch_size, self.seq_length, self.hidden_size)    )
 def 						UpperCAmelCase__							(	self		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, )						->				List[str]:
       '''simple docstring'''





       UpperCAmelCase     :			Union[str, Any]     	=ElectraForMaskedLM(config=snake_case__    )
       model.to(snake_case__    )
       model.eval()
       UpperCAmelCase     :			Optional[int]     	=model(snake_case__		, attention_mask=snake_case__		, token_type_ids=snake_case__		, labels=snake_case__    )
       self.parent.assertEqual(result.logits.shape		, (self.batch_size, self.seq_length, self.vocab_size)    )
 def 						UpperCAmelCase__							(	self		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, )						->				Dict:
       '''simple docstring'''





       UpperCAmelCase     :			int     	=ElectraForCausalLM(config=snake_case__    )
       model.to(snake_case__    )
       model.eval()
       UpperCAmelCase     :			Optional[Any]     	=model(snake_case__		, attention_mask=snake_case__		, token_type_ids=snake_case__		, labels=snake_case__    )
       self.parent.assertEqual(result.logits.shape		, (self.batch_size, self.seq_length, self.vocab_size)    )
 def 						UpperCAmelCase__							(	self		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, )						->				Any:
       '''simple docstring'''





       UpperCAmelCase     :			Any     	=self.num_labels
       UpperCAmelCase     :			Dict     	=ElectraForTokenClassification(config=snake_case__    )
       model.to(snake_case__    )
       model.eval()
       UpperCAmelCase     :			Dict     	=model(snake_case__		, attention_mask=snake_case__		, token_type_ids=snake_case__		, labels=snake_case__    )
       self.parent.assertEqual(result.logits.shape		, (self.batch_size, self.seq_length, self.num_labels)    )
 def 						UpperCAmelCase__							(	self		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, )						->				Dict:
       '''simple docstring'''





       UpperCAmelCase     :			List[Any]     	=self.num_labels
       UpperCAmelCase     :			str     	=ElectraForPreTraining(config=snake_case__    )
       model.to(snake_case__    )
       model.eval()
       UpperCAmelCase     :			Union[str, Any]     	=model(snake_case__		, attention_mask=snake_case__		, token_type_ids=snake_case__		, labels=snake_case__    )
       self.parent.assertEqual(result.logits.shape		, (self.batch_size, self.seq_length)    )
 def 						UpperCAmelCase__							(	self		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, )						->				str:
       '''simple docstring'''





       UpperCAmelCase     :			Union[str, Any]     	=self.num_labels
       UpperCAmelCase     :			Optional[int]     	=ElectraForSequenceClassification(snake_case__    )
       model.to(snake_case__    )
       model.eval()
       UpperCAmelCase     :			str     	=model(snake_case__		, attention_mask=snake_case__		, token_type_ids=snake_case__		, labels=snake_case__    )
       self.parent.assertEqual(result.logits.shape		, (self.batch_size, self.num_labels)    )
 def 						UpperCAmelCase__							(	self		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, )						->				str:
       '''simple docstring'''





       UpperCAmelCase     :			str     	=ElectraForQuestionAnswering(config=snake_case__    )
       model.to(snake_case__    )
       model.eval()
       UpperCAmelCase     :			Optional[Any]     	=model(
           snake_case__		, attention_mask=snake_case__		, token_type_ids=snake_case__		, start_positions=snake_case__		, end_positions=snake_case__		, )
       self.parent.assertEqual(result.start_logits.shape		, (self.batch_size, self.seq_length)    )
       self.parent.assertEqual(result.end_logits.shape		, (self.batch_size, self.seq_length)    )
 def 						UpperCAmelCase__							(	self		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, snake_case__		, )						->				List[str]:
       '''simple docstring'''





       UpperCAmelCase     :			List[str]     	=self.num_choices
       UpperCAmelCase     :			Tuple     	=ElectraForMultipleChoice(config=snake_case__    )
       model.to(snake_case__    )
       model.eval()
       UpperCAmelCase     :			str     	=input_ids.unsqueeze(1    ).expand(-1		, self.num_choices		, -1    ).contiguous()
       UpperCAmelCase     :			int     	=token_type_ids.unsqueeze(1    ).expand(-1		, self.num_choices		, -1    ).contiguous()
       UpperCAmelCase     :			Any     	=input_mask.unsqueeze(1    ).expand(-1		, self.num_choices		, -1    ).contiguous()
       UpperCAmelCase     :			int     	=model(
           snake_case__		, attention_mask=snake_case__		, token_type_ids=snake_case__		, labels=snake_case__		, )
       self.parent.assertEqual(result.logits.shape		, (self.batch_size, self.num_choices)    )






 def 						UpperCAmelCase__							(	self    )						->				str:
       '''simple docstring'''





       UpperCAmelCase     :			int     	=self.prepare_config_and_inputs()
       (
           (
           UpperCAmelCase
       )	,    (
           UpperCAmelCase
       )	,    (
           UpperCAmelCase
       )	,    (
           UpperCAmelCase
       )	,    (
           UpperCAmelCase
       )	,    (
           UpperCAmelCase
       )	,    (
           UpperCAmelCase
       )	,    (
           UpperCAmelCase
       )	,    
       )     :			Any     	=config_and_inputs
       UpperCAmelCase     :			int     	={'''input_ids''': input_ids, '''token_type_ids''': token_type_ids, '''attention_mask''': input_mask}
       return config, inputs_dict







@require_torch
class       __snake_case (  lowerCamelCase__       , lowerCamelCase__       , unittest.TestCase ):
 __lowerCamelCase     : str 	=   (
     (
         ElectraModel,
         ElectraForPreTraining,
         ElectraForMaskedLM,
         ElectraForCausalLM,
         ElectraForMultipleChoice,
         ElectraForTokenClassification,
         ElectraForSequenceClassification,
         ElectraForQuestionAnswering,
     )
     if is_torch_available()
     else ()
 )
 __lowerCamelCase     : int 	=   (
     {
         """feature-extraction""": ElectraModel,
         """fill-mask""": ElectraForMaskedLM,
         """question-answering""": ElectraForQuestionAnswering,
         """text-classification""": ElectraForSequenceClassification,
         """text-generation""": ElectraForCausalLM,
         """token-classification""": ElectraForTokenClassification,
         """zero-shot""": ElectraForSequenceClassification,
     }
     if is_torch_available()
     else {}
 )
 __lowerCamelCase     : List[Any] 	=   True
 def 						UpperCAmelCase__							(	self		, snake_case__		, snake_case__		, snake_case__=False    )						->				Dict:
       '''simple docstring'''





       UpperCAmelCase     :			Any     	=super()._prepare_for_class(snake_case__		, snake_case__		, return_labels=snake_case__    )

       if return_labels:
             if model_class in get_values(snake_case__    ):
                   UpperCAmelCase     :			Any     	=torch.zeros(
                       (self.model_tester.batch_size, self.model_tester.seq_length)		, dtype=torch.long		, device=snake_case__    )
       return inputs_dict
 def 						UpperCAmelCase__							(	self    )						->				Dict:
       '''simple docstring'''





       UpperCAmelCase     :			str     	=ElectraModelTester(self    )
       UpperCAmelCase     :			str     	=ConfigTester(self		, config_class=snake_case__		, hidden_size=37    )
 def 						UpperCAmelCase__							(	self    )						->				Dict:
       '''simple docstring'''





       self.config_tester.run_common_tests()
 def 						UpperCAmelCase__							(	self    )						->				Optional[Any]:
       '''simple docstring'''





       UpperCAmelCase     :			Dict     	=self.model_tester.prepare_config_and_inputs()
       self.model_tester.create_and_check_electra_model(*snake_case__    )
 def 						UpperCAmelCase__							(	self    )						->				Optional[int]:
       '''simple docstring'''





       UpperCAmelCase     :			List[str]     	=self.model_tester.prepare_config_and_inputs_for_decoder()
       self.model_tester.create_and_check_electra_model_as_decoder(*snake_case__    )
 def 						UpperCAmelCase__							(	self    )						->				Any:
       '''simple docstring'''





       UpperCAmelCase     :			Dict     	=self.model_tester.prepare_config_and_inputs()
       for type in ["absolute", "relative_key", "relative_key_query"]:
             UpperCAmelCase     :			Any     	=type
             self.model_tester.create_and_check_electra_model(*snake_case__    )
 def 						UpperCAmelCase__							(	self    )						->				int:
       '''simple docstring'''





       UpperCAmelCase     :			int     	=self.model_tester.prepare_config_and_inputs()
       self.model_tester.create_and_check_electra_for_masked_lm(*snake_case__    )
 def 						UpperCAmelCase__							(	self    )						->				List[str]:
       '''simple docstring'''





       UpperCAmelCase     :			List[str]     	=self.model_tester.prepare_config_and_inputs()
       self.model_tester.create_and_check_electra_for_token_classification(*snake_case__    )
 def 						UpperCAmelCase__							(	self    )						->				str:
       '''simple docstring'''





       UpperCAmelCase     :			Tuple     	=self.model_tester.prepare_config_and_inputs()
       self.model_tester.create_and_check_electra_for_pretraining(*snake_case__    )
 def 						UpperCAmelCase__							(	self    )						->				Tuple:
       '''simple docstring'''





       UpperCAmelCase     :			Tuple     	=self.model_tester.prepare_config_and_inputs()
       self.model_tester.create_and_check_electra_for_sequence_classification(*snake_case__    )
 def 						UpperCAmelCase__							(	self    )						->				Optional[Any]:
       '''simple docstring'''





       UpperCAmelCase     :			str     	=self.model_tester.prepare_config_and_inputs()
       self.model_tester.create_and_check_electra_for_question_answering(*snake_case__    )
 def 						UpperCAmelCase__							(	self    )						->				str:
       '''simple docstring'''





       UpperCAmelCase     :			Optional[int]     	=self.model_tester.prepare_config_and_inputs()
       self.model_tester.create_and_check_electra_for_multiple_choice(*snake_case__    )
 @slow
 def 						UpperCAmelCase__							(	self    )						->				Optional[int]:
       '''simple docstring'''





       for model_name in ELECTRA_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
             UpperCAmelCase     :			Union[str, Any]     	=ElectraModel.from_pretrained(snake_case__    )
             self.assertIsNotNone(snake_case__    )






 def 						UpperCAmelCase__							(	self    )						->				Dict:
       '''simple docstring'''





       UpperCAmelCase     :			Tuple     	=self.model_tester.prepare_config_and_inputs_for_decoder()
       self.model_tester.create_and_check_electra_for_causal_lm(*snake_case__    )







@require_torch
class       __snake_case (  unittest.TestCase ):
 @slow
 def 						UpperCAmelCase__							(	self    )						->				Optional[Any]:
       '''simple docstring'''





       UpperCAmelCase     :			Union[str, Any]     	=ElectraModel.from_pretrained('''google/electra-small-discriminator'''    )
       UpperCAmelCase     :			List[Any]     	=torch.tensor([[0, 345, 232, 328, 740, 140, 1695, 69, 6078, 1588, 2]]    )
       UpperCAmelCase     :			str     	=torch.tensor([[0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]    )
       UpperCAmelCase     :			Tuple     	=model(snake_case__		, attention_mask=snake_case__    )[0]
       UpperCAmelCase     :			str     	=torch.Size((1, 11, 256)    )
       self.assertEqual(output.shape		, snake_case__    )
       UpperCAmelCase     :			Any     	=torch.tensor(
           [[[0.4471, 0.6821, -0.3265], [0.4627, 0.5255, -0.3668], [0.4532, 0.3313, -0.4344]]]    )

       self.assertTrue(torch.allclose(output[:, 1:4, 1:4]		, snake_case__		, atol=1e-4    )    )

import inspect
import json
import os
import tempfile
import unittest

from transformers.models.speech_to_text_a import SpeechaTextaTokenizer
from transformers.models.speech_to_text_a.tokenization_speech_to_text_a import VOCAB_FILES_NAMES

from ...test_tokenization_common import TokenizerTesterMixin







class       __snake_case (  lowerCamelCase__       , unittest.TestCase ):
 __lowerCamelCase     : Any 	=   SpeechaTextaTokenizer
 __lowerCamelCase     : Tuple 	=   False
 def 						UpperCAmelCase__							(	self    )						->				List[Any]:
       '''simple docstring'''





       super().setUp()

       UpperCAmelCase     :			Union[str, Any]     	='''<s> <pad> </s> <unk> here@@ a couple of@@ words for the he@@ re@@ vocab'''.split(''' '''    )
       UpperCAmelCase     :			int     	=['''he re</w> 123''', '''here a 1456''']
       UpperCAmelCase     :			int     	=dict(zip(snake_case__		, range(len(snake_case__    )    )    )    )

       UpperCAmelCase     :			Tuple     	={'''pad_token''': '''<pad>''', '''unk_token''': '''<unk>''', '''bos_token''': '''<s>''', '''eos_token''': '''</s>'''}

       UpperCAmelCase     :			Tuple     	=tempfile.mkdtemp()
       UpperCAmelCase     :			Optional[Any]     	=os.path.join(self.tmpdirname		, VOCAB_FILES_NAMES['''vocab_file''']    )
       UpperCAmelCase     :			Dict     	=os.path.join(self.tmpdirname		, VOCAB_FILES_NAMES['''merges_file''']    )

       with open(self.vocab_file		, '''w'''		, encoding='''utf-8'''    ) as fp:
             fp.write(json.dumps(snake_case__    ) + '''\n'''    )

       with open(self.merges_file		, '''w'''    ) as fp:
             fp.write('''\n'''.join(snake_case__    )    )
 def 						UpperCAmelCase__							(	self    )						->				Union[str, Any]:
       '''simple docstring'''





       UpperCAmelCase     :			Union[str, Any]     	=list(self.get_tokenizer().get_vocab().keys()    )

       self.assertEqual(vocab_keys[0]		, '''<s>'''    )
       self.assertEqual(vocab_keys[1]		, '''<pad>'''    )
       self.assertEqual(vocab_keys[-1]		, '''vocab'''    )
       self.assertEqual(len(snake_case__    )		, 14    )
 def 						UpperCAmelCase__							(	self    )						->				Union[str, Any]:
       '''simple docstring'''





       self.assertEqual(self.get_tokenizer().vocab_size		, 14    )
 def 						UpperCAmelCase__							(	self    )						->				List[Any]:
       '''simple docstring'''





       UpperCAmelCase     :			Union[str, Any]     	=SpeechaTextaTokenizer.from_pretrained(self.tmpdirname    )

       # make sure @@ is correctly concatenated
       UpperCAmelCase     :			str     	=[4, 6, 8, 7, 10]  # ["here@@", "couple", "words", "of@@", "the"]
       UpperCAmelCase     :			Optional[Any]     	=tokenizer.decode(snake_case__    )

       self.assertTrue(output_string == '''herecouple words ofthe'''    )
 def 						UpperCAmelCase__							(	self    )						->				Tuple:
       '''simple docstring'''





       UpperCAmelCase     :			Optional[Any]     	=SpeechaTextaTokenizer.from_pretrained(self.tmpdirname    )

       with tempfile.TemporaryDirectory() as tmp_dirname:
             tokenizer.save_pretrained(snake_case__    )
             os.remove(os.path.join(snake_case__		, '''merges.txt'''    )    )

             # load tokenizer without merges file should not throw an error
             UpperCAmelCase     :			Any     	=SpeechaTextaTokenizer.from_pretrained(snake_case__    )

       with tempfile.TemporaryDirectory() as tmp_dirname:
             # save tokenizer and load again
             tokenizer.save_pretrained(snake_case__    )
             UpperCAmelCase     :			List[str]     	=SpeechaTextaTokenizer.from_pretrained(snake_case__    )

       self.assertIsNotNone(snake_case__    )






 def 						UpperCAmelCase__							(	self    )						->				int:
       '''simple docstring'''





       if not self.test_slow_tokenizer:
             return

       UpperCAmelCase     :			List[str]     	=inspect.signature(self.tokenizer_class.__init__    )
       UpperCAmelCase     :			Union[str, Any]     	=self.get_tokenizer()

       for parameter_name, parameter in signature.parameters.items():
             if parameter.default != inspect.Parameter.empty and parameter_name != "merges_file":
                   self.assertIn(snake_case__		, tokenizer.init_kwargs    )
