





'''simple docstring'''






import unittest

from transformers import BertGenerationConfig, is_torch_available
from transformers.testing_utils import require_torch, slow, torch_device

from ...generation.test_utils import GenerationTesterMixin
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 BertGenerationDecoder, BertGenerationEncoder
class 					__snake_case  :






   '''simple docstring'''





   def __init__(							self	,		__SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE=1_3	,		__SCREAMING_SNAKE_CASE=7	,		__SCREAMING_SNAKE_CASE=True	,		__SCREAMING_SNAKE_CASE=True	,		__SCREAMING_SNAKE_CASE=9_9	,		__SCREAMING_SNAKE_CASE=3_2	,		__SCREAMING_SNAKE_CASE=5	,		__SCREAMING_SNAKE_CASE=4	,		__SCREAMING_SNAKE_CASE=3_7	,		__SCREAMING_SNAKE_CASE="gelu"	,		__SCREAMING_SNAKE_CASE=0.1	,		__SCREAMING_SNAKE_CASE=0.1	,		__SCREAMING_SNAKE_CASE=5_0	,		__SCREAMING_SNAKE_CASE=0.02	,		__SCREAMING_SNAKE_CASE=True	,		__SCREAMING_SNAKE_CASE=None	,		):
    snake_case__     :					List[str]    =  parent
    snake_case__     :					str    =  batch_size
    snake_case__     :					Dict    =  seq_length
    snake_case__     :					int    =  is_training
    snake_case__     :					Optional[Any]    =  use_input_mask
    snake_case__     :					Tuple    =  vocab_size
    snake_case__     :					Tuple    =  hidden_size
    snake_case__     :					List[str]    =  num_hidden_layers
    snake_case__     :					List[str]    =  num_attention_heads
    snake_case__     :					List[str]    =  intermediate_size
    snake_case__     :					Optional[Any]    =  hidden_act
    snake_case__     :					Union[str, Any]    =  hidden_dropout_prob
    snake_case__     :					Dict    =  attention_probs_dropout_prob
    snake_case__     :					Optional[int]    =  max_position_embeddings
    snake_case__     :					List[Any]    =  initializer_range
    snake_case__     :					str    =  use_labels
    snake_case__     :					Tuple    =  scope

   def 		__UpperCamelCase						(							self       ):
    snake_case__     :					Tuple    =  ids_tensor([self.batch_size, self.seq_length]	,		self.vocab_size       )

    snake_case__     :					int    =  None
    if self.use_input_mask:
     snake_case__     :					str    =  random_attention_mask([self.batch_size, self.seq_length]       )

    if self.use_labels:
     snake_case__     :					Optional[int]    =  ids_tensor([self.batch_size, self.seq_length]	,		self.vocab_size       )

    snake_case__     :					Any    =  self.get_config()

    return config, input_ids, input_mask, token_labels

   def 		__UpperCamelCase						(							self       ):
    return BertGenerationConfig(
        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	,		is_decoder=__SCREAMING_SNAKE_CASE	,		initializer_range=self.initializer_range	,		)

   def 		__UpperCamelCase						(							self       ):
    (
        (
        snake_case__
    )  ,							(
        snake_case__
    )  ,							(
        snake_case__
    )  ,							(
        snake_case__
    )  ,							
    )     :					List[str]    =  self.prepare_config_and_inputs()

    snake_case__     :					str    =  True
    snake_case__     :					Tuple    =  floats_tensor([self.batch_size, self.seq_length, self.hidden_size]       )
    snake_case__     :					Tuple    =  ids_tensor([self.batch_size, self.seq_length]	,		vocab_size=2       )

    return (
        config,
        input_ids,
        input_mask,
        token_labels,
        encoder_hidden_states,
        encoder_attention_mask,
    )

   def 		__UpperCamelCase						(							self	,		__SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE	,		**__SCREAMING_SNAKE_CASE	,		):
    snake_case__     :					Union[str, Any]    =  BertGenerationEncoder(config=__SCREAMING_SNAKE_CASE       )
    model.to(__SCREAMING_SNAKE_CASE       )
    model.eval()
    snake_case__     :					str    =  model(__SCREAMING_SNAKE_CASE	,		attention_mask=__SCREAMING_SNAKE_CASE       )
    snake_case__     :					Any    =  model(__SCREAMING_SNAKE_CASE       )
    self.parent.assertEqual(result.last_hidden_state.shape	,		(self.batch_size, self.seq_length, self.hidden_size)       )

   def 		__UpperCamelCase						(							self	,		__SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE	,		**__SCREAMING_SNAKE_CASE	,		):
    snake_case__     :					str    =  True
    snake_case__     :					List[Any]    =  BertGenerationEncoder(config=__SCREAMING_SNAKE_CASE       )
    model.to(__SCREAMING_SNAKE_CASE       )
    model.eval()
    snake_case__     :					Dict    =  model(
        __SCREAMING_SNAKE_CASE	,		attention_mask=__SCREAMING_SNAKE_CASE	,		encoder_hidden_states=__SCREAMING_SNAKE_CASE	,		encoder_attention_mask=__SCREAMING_SNAKE_CASE	,		)
    snake_case__     :					List[Any]    =  model(
        __SCREAMING_SNAKE_CASE	,		attention_mask=__SCREAMING_SNAKE_CASE	,		encoder_hidden_states=__SCREAMING_SNAKE_CASE	,		)
    self.parent.assertEqual(result.last_hidden_state.shape	,		(self.batch_size, self.seq_length, self.hidden_size)       )

   def 		__UpperCamelCase						(							self	,		__SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE	,		**__SCREAMING_SNAKE_CASE	,		):
    snake_case__     :					List[Any]    =  True
    snake_case__     :					Optional[int]    =  True
    snake_case__     :					int    =  BertGenerationDecoder(config=__SCREAMING_SNAKE_CASE       ).to(__SCREAMING_SNAKE_CASE       ).eval()

    # first forward pass
    snake_case__     :					int    =  model(
        __SCREAMING_SNAKE_CASE	,		attention_mask=__SCREAMING_SNAKE_CASE	,		encoder_hidden_states=__SCREAMING_SNAKE_CASE	,		encoder_attention_mask=__SCREAMING_SNAKE_CASE	,		use_cache=__SCREAMING_SNAKE_CASE	,		)
    snake_case__     :					List[Any]    =  outputs.past_key_values

    # create hypothetical multiple next token and extent to next_input_ids
    snake_case__     :					int    =  ids_tensor((self.batch_size, 3)	,		config.vocab_size       )
    snake_case__     :					int    =  ids_tensor((self.batch_size, 3)	,		vocab_size=2       )

    # append to next input_ids and
    snake_case__     :					Any    =  torch.cat([input_ids, next_tokens]	,		dim=-1       )
    snake_case__     :					Optional[Any]    =  torch.cat([input_mask, next_mask]	,		dim=-1       )

    snake_case__     :					Any    =  model(
        __SCREAMING_SNAKE_CASE	,		attention_mask=__SCREAMING_SNAKE_CASE	,		encoder_hidden_states=__SCREAMING_SNAKE_CASE	,		encoder_attention_mask=__SCREAMING_SNAKE_CASE	,		output_hidden_states=__SCREAMING_SNAKE_CASE	,		)["""hidden_states"""][0]
    snake_case__     :					List[str]    =  model(
        __SCREAMING_SNAKE_CASE	,		attention_mask=__SCREAMING_SNAKE_CASE	,		encoder_hidden_states=__SCREAMING_SNAKE_CASE	,		encoder_attention_mask=__SCREAMING_SNAKE_CASE	,		past_key_values=__SCREAMING_SNAKE_CASE	,		output_hidden_states=__SCREAMING_SNAKE_CASE	,		)["""hidden_states"""][0]

    # select random slice
    snake_case__     :					Tuple    =  ids_tensor((1,)	,		output_from_past.shape[-1]       ).item()
    snake_case__     :					Any    =  output_from_no_past[:, -3:, random_slice_idx].detach()
    snake_case__     :					int    =  output_from_past[:, :, random_slice_idx].detach()

    self.parent.assertTrue(output_from_past_slice.shape[1] == next_tokens.shape[1]       )

    # test that outputs are equal for slice
    self.parent.assertTrue(torch.allclose(__SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE	,		atol=1e-3       )       )

   def 		__UpperCamelCase						(							self	,		__SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE	,		*__SCREAMING_SNAKE_CASE	,		):
    snake_case__     :					List[str]    =  BertGenerationDecoder(__SCREAMING_SNAKE_CASE       )
    model.to(__SCREAMING_SNAKE_CASE       )
    model.eval()
    snake_case__     :					Dict    =  model(__SCREAMING_SNAKE_CASE	,		attention_mask=__SCREAMING_SNAKE_CASE	,		labels=__SCREAMING_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__     :					int    =  self.prepare_config_and_inputs()
    snake_case__     :					Optional[int]    =  {"""input_ids""": input_ids, """attention_mask""": input_mask}
    return config, inputs_dict



@require_torch
class 					__snake_case  (					__SCREAMING_SNAKE_CASE		,				__SCREAMING_SNAKE_CASE		,				__SCREAMING_SNAKE_CASE		,				unittest.TestCase							):






   '''simple docstring'''





   lowerCamelCase__    							=      (BertGenerationEncoder, BertGenerationDecoder) if is_torch_available() else ()
   lowerCamelCase__    							=      (BertGenerationDecoder,) if is_torch_available() else ()
   lowerCamelCase__    							=      (
       {'''feature-extraction''': BertGenerationEncoder, '''text-generation''': BertGenerationDecoder}
       if is_torch_available()
       else {}
   )

   def 		__UpperCamelCase						(							self       ):
    snake_case__     :					Optional[Any]    =  BertGenerationEncoderTester(self       )
    snake_case__     :					List[str]    =  ConfigTester(self	,		config_class=__SCREAMING_SNAKE_CASE	,		hidden_size=3_7       )

   def 		__UpperCamelCase						(							self       ):
    self.config_tester.run_common_tests()

   def 		__UpperCamelCase						(							self       ):
    snake_case__     :					Union[str, Any]    =  self.model_tester.prepare_config_and_inputs()
    self.model_tester.create_and_check_model(*__SCREAMING_SNAKE_CASE       )

   def 		__UpperCamelCase						(							self       ):
    snake_case__  ,							snake_case__  ,							snake_case__  ,							snake_case__     :					Dict    =  self.model_tester.prepare_config_and_inputs()
    snake_case__     :					List[Any]    =  """bert"""
    self.model_tester.create_and_check_model(__SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE       )

   def 		__UpperCamelCase						(							self       ):
    snake_case__     :					Optional[Any]    =  self.model_tester.prepare_config_and_inputs_for_decoder()
    self.model_tester.create_and_check_model_as_decoder(*__SCREAMING_SNAKE_CASE       )

   def 		__UpperCamelCase						(							self       ):
    snake_case__     :					List[Any]    =  self.model_tester.prepare_config_and_inputs_for_decoder()
    self.model_tester.create_and_check_decoder_model_past_large_inputs(*__SCREAMING_SNAKE_CASE       )

   def 		__UpperCamelCase						(							self       ):
    # This regression test was failing with PyTorch < 1.3
    (
        (
        snake_case__
    )  ,							(
        snake_case__
    )  ,							(
        snake_case__
    )  ,							(
        snake_case__
    )  ,							(
        snake_case__
    )  ,							(
        snake_case__
    )  ,							
    )     :					Union[str, Any]    =  self.model_tester.prepare_config_and_inputs_for_decoder()

    snake_case__     :					Tuple    =  None

    self.model_tester.create_and_check_model_as_decoder(
        __SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE	,		__SCREAMING_SNAKE_CASE	,		)

   def 		__UpperCamelCase						(							self       ):
    snake_case__     :					int    =  self.model_tester.prepare_config_and_inputs_for_decoder()
    self.model_tester.create_and_check_for_causal_lm(*__SCREAMING_SNAKE_CASE       )


   @slow
   def 		__UpperCamelCase						(							self       ):
    snake_case__     :					Union[str, Any]    =  BertGenerationEncoder.from_pretrained("""google/bert_for_seq_generation_L-24_bbc_encoder"""       )
    self.assertIsNotNone(__SCREAMING_SNAKE_CASE       )



@require_torch
class 					__snake_case  (					unittest.TestCase							):






   '''simple docstring'''





   @slow
   def 		__UpperCamelCase						(							self       ):
    snake_case__     :					Union[str, Any]    =  BertGenerationEncoder.from_pretrained("""google/bert_for_seq_generation_L-24_bbc_encoder"""       )
    snake_case__     :					List[Any]    =  torch.tensor([[1_0_1, 7_5_9_2, 1_0_1_0, 2_0_2_6, 3_8_9_9, 2_0_0_3, 1_0_1_4_0, 1_0_2]]       )
    with torch.no_grad():
     snake_case__     :					List[Any]    =  model(__SCREAMING_SNAKE_CASE       )[0]
    snake_case__     :					str    =  torch.Size([1, 8, 1_0_2_4]       )
    self.assertEqual(output.shape	,		__SCREAMING_SNAKE_CASE       )
    snake_case__     :					List[Any]    =  torch.tensor(
        [[[0.1775, 0.0083, -0.0321], [1.6002, 0.1287, 0.3912], [2.1473, 0.5791, 0.6066]]]       )
    self.assertTrue(torch.allclose(output[:, :3, :3]	,		__SCREAMING_SNAKE_CASE	,		atol=1e-4       )       )



@require_torch
class 					__snake_case  (					unittest.TestCase							):






   '''simple docstring'''





   @slow
   def 		__UpperCamelCase						(							self       ):
    snake_case__     :					List[Any]    =  BertGenerationDecoder.from_pretrained("""google/bert_for_seq_generation_L-24_bbc_encoder"""       )
    snake_case__     :					Tuple    =  torch.tensor([[1_0_1, 7_5_9_2, 1_0_1_0, 2_0_2_6, 3_8_9_9, 2_0_0_3, 1_0_1_4_0, 1_0_2]]       )
    with torch.no_grad():
     snake_case__     :					Optional[Any]    =  model(__SCREAMING_SNAKE_CASE       )[0]
    snake_case__     :					List[Any]    =  torch.Size([1, 8, 5_0_3_5_8]       )
    self.assertEqual(output.shape	,		__SCREAMING_SNAKE_CASE       )
    snake_case__     :					Optional[int]    =  torch.tensor(
        [[[-0.5788, -2.5994, -3.7054], [0.0438, 4.7997, 1.8795], [1.5862, 6.6409, 4.4638]]]       )
    self.assertTrue(torch.allclose(output[:, :3, :3]	,		__SCREAMING_SNAKE_CASE	,		atol=1e-4       )       )






from dataclasses import dataclass, field
from typing import Optional




@dataclass
class   __lowercase						:
	_A       =   field(
	    default="codeparrot/codeparrot"   , metadata={"help": "Model name or path of model to be trained."}       )
	_A       =   field(
	    default="./"   , metadata={"help": "Save dir where model repo is cloned and models updates are saved to."}       )
	_A       =   field(
	    default="codeparrot/codeparrot-clean-train"   , metadata={"help": "Name or path of training dataset."}       )
	_A       =   field(
	    default="codeparrot/codeparrot-clean-valid"   , metadata={"help": "Name or path of validation dataset."}       )
	_A       =   field(default=2   , metadata={"help": "Batch size for training."}       )
	_A       =   field(default=2   , metadata={"help": "Batch size for evaluation."}       )
	_A       =   field(default=0.1   , metadata={"help": "Value of weight decay."}       )
	_A       =   field(
	    default=10000   , metadata={"help": "Size of buffer used to shuffle streaming dataset."}       )
	_A       =   field(default=2e-4   , metadata={"help": "Learning rate fo training."}       )
	_A       =   field(default="cosine"   , metadata={"help": "Learning rate."}       )
	_A       =   field(
	    default=750   , metadata={"help": "Number of warmup steps in the learning rate schedule."}       )
	_A       =   field(
	    default=16   , metadata={"help": "Number of gradient accumulation steps."}       )
	_A       =   field(
	    default=__snake_case   , metadata={"help": "Use gradient checkpointing to reduce memory footprint."}       )
	_A       =   field(default=50000   , metadata={"help": "Maximum number of training steps."}       )
	_A       =   field(
	    default=-1   , metadata={"help": "Maximum number of evaluation steps. If -1 the full dataset is evaluated."}       )
	_A       =   field(default=1024   , metadata={"help": "Sequence lengths used for training."}       )
	_A       =   field(default=1   , metadata={"help": "Training seed."}       )
	_A       =   field(
	    default=1024   , metadata={"help": "Interval to save checkpoints. Measured as number of forward passes not training steps."}   , )
	_A       =   field(
	    default=__snake_case   , metadata={"help": "States path if the training should continue from a checkpoint folder."}       )
	_A       =   field(default=__snake_case   , metadata={"help": "If True the data is pretokenized."}       )




@dataclass
class   __lowercase						:
	_A       =   field(
	    default="codeparrot/codeparrot"   , metadata={"help": "Model name or path of model to be evaluated."}       )
	_A       =   field(
	    default="codeparrot/codeparrot-clean-valid"   , metadata={"help": "Name or path of validation dataset."}       )
	_A       =   field(default=2   , metadata={"help": "Batch size used for evaluation."}       )
	_A       =   field(
	    default=-1   , metadata={"help": "Maximum number of evaluation steps. If -1 the full dataset is evaluated."}       )
	_A       =   field(default=1024   , metadata={"help": "Length of sequences to be evaluated."}       )
	_A       =   field(default=1   , metadata={"help": "Random seed used for evaluation."}       )




@dataclass
class   __lowercase						:
	_A       =   field(
	    default="codeparrot/codeparrot"   , metadata={"help": "Model name or path of model to be evaluated."}       )
	_A       =   field(default=__snake_case   , metadata={"help": "Number of workers used for code evaluation."}       )
	_A       =   field(
	    default=__snake_case   , metadata={"help": "The number of human-eval tasks to run. If not included all tasks are evaluated."}   , )
	_A       =   field(
	    default=__snake_case   , metadata={"help": "Sample from the language model's output distribution."}       )
	_A       =   field(default=0.2   , metadata={"help": "Sampling temperature used for generation."}       )
	_A       =   field(default=256   , metadata={"help": "Maximum number of newly generated tokens."}       )
	_A       =   field(default=0   , metadata={"help": "Top-k parameter used for generation."}       )
	_A       =   field(default=0.95   , metadata={"help": "Top-p parameter used for nucleus sampling."}       )
	_A       =   field(default=10   , metadata={"help": "Number of generations to run in parallel."}       )
	_A       =   field(
	    default=200   , metadata={"help": "Number of completions to generate for each sample."}       )
	_A       =   field(default=1   , metadata={"help": "Random seed used for evaluation."}       )
	_A       =   field(
	    default="eval_results.json"   , metadata={"help": "Random seed used for evaluation."}       )
	_A       =   field(
	    default="0"   , metadata={"help": "Allow `code_eval` to execute Python code on machine"}       )
	_A       =   field(
	    default=-1   , metadata={
	        "help": (
	            "Determine which device to run the `text-generation` Pipeline on. -1 is CPU and any zero or positive"
	            " number corresponds to which GPU device id to run on."
	        )
	    }   , )




@dataclass
class   __lowercase						:
	_A       =   field(
	    default=__snake_case   , metadata={
	        "help": "The number of CPU cores to use for parallel preprocessing. Default uses the maximum available."
	    }   , )
	_A       =   field(
	    default="transformersbook/codeparrot"   , metadata={"help": "Folder or name of dataset to process."}       )
	_A       =   field(
	    default="codeparrot-clean"   , metadata={"help": "Folder to save processed processed dataset."}       )
	_A       =   field(
	    default=100000   , metadata={"help": "Number of files to save per JSON output file."}       )
	_A       =   field(default="content"   , metadata={"help": "Column containing text data to process."}       )
	_A       =   field(
	    default=1000   , metadata={"help": "Maximum line length in file, otherwise file is filtered."}       )
	_A       =   field(
	    default=100   , metadata={"help": "Maximum mean line length in file, otherwise file is filtered."}       )
	_A       =   field(
	    default=0.25   , metadata={"help": "Maximum fraction of non-alphanumeric characters, otherwise file is filtered."}       )
	_A       =   field(
	    default=1.5   , metadata={"help": "Minimum character token ratio for the file, otherwise file is filtered."}       )
	_A       =   field(
	    default=0.7   , metadata={"help": "Probability for filtering config, test and uncommon files."}       )
	_A       =   field(
	    default="codeparrot/codeparrot"   , metadata={"help": "Name or path to the tokenizer."}   , )
	_A       =   field(
	    default=__snake_case   , metadata={"help": "If True, near-duplicate samples are removed."}       )
	_A       =   field(
	    default=0.85   , metadata={"help": "Jaccard threshold for near-duplicate samples."}       )




@dataclass
class   __lowercase						:
	_A       =   field(
	    default="gpt2"   , metadata={"help": "Base tokenizer to build new tokenizer from."}       )
	_A       =   field(
	    default="transformersbook/codeparrot-train"   , metadata={"help": "Dataset to train tokenizer on."}       )
	_A       =   field(default="content"   , metadata={"help": "Column containing text data to process."}       )
	_A       =   field(default=200000   , metadata={"help": "Number of examples to train tokenizer on."}       )
	_A       =   field(
	    default=32768   , metadata={"help": "Number of examples to train the tokenizer on."}       )
	_A       =   field(default="codeparrot"   , metadata={"help": "Name of new tokenizer."}       )
	_A       =   field(default=__snake_case   , metadata={"help": "Push saved tokenizer to the hub."}       )




@dataclass
class   __lowercase						:
	_A       =   field(
	    default="codeparrot/codeparrot"   , metadata={"help": "Name or path to the tokenizer."}       )
	_A       =   field(
	    default="codeparrot/codeparrot-clean-train"   , metadata={"help": "Name or path to the dataset to pretokenize."}       )
	_A       =   field(
	    default="tokenized-codeparrot-train"   , metadata={"help": "Repo name of the pretokenized data."}       )
	_A       =   field(default=__snake_case   , metadata={"help": "Number of workers used for code evaluation."}       )




@dataclass
class   __lowercase						:
	_A       =   field(
	    default="gpt2-large"   , metadata={"help": "Configuration to use for model initialization."}       )
	_A       =   field(
	    default="codeparrot/codeparrot"   , metadata={"help": "Tokenizer attached to model."}       )
	_A       =   field(default="codeparrot"   , metadata={"help": "Name of the created model."}       )
	_A       =   field(default=__snake_case   , metadata={"help": "Push saved tokenizer to the hub."}       )




