




'''simple docstring'''







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 					lowerCamelCase_							:




					'''simple docstring'''






					def __init__(   self,  __UpperCamelCase,  __UpperCamelCase=13,  __UpperCamelCase=7,  __UpperCamelCase=True,  __UpperCamelCase=True,  __UpperCamelCase=True,  __UpperCamelCase=True,  __UpperCamelCase=99,  __UpperCamelCase=32,  __UpperCamelCase=5,  __UpperCamelCase=4,  __UpperCamelCase=37,  __UpperCamelCase="gelu",  __UpperCamelCase=0.1,  __UpperCamelCase=0.1,  __UpperCamelCase=512,  __UpperCamelCase=16,  __UpperCamelCase=2,  __UpperCamelCase=0.02,  __UpperCamelCase=3,  __UpperCamelCase=4,  __UpperCamelCase=None,  ):
							_snake_case     	=	parent
							_snake_case     	=	batch_size
							_snake_case     	=	seq_length
							_snake_case     	=	is_training
							_snake_case     	=	use_input_mask
							_snake_case     	=	use_token_type_ids
							_snake_case     	=	use_labels
							_snake_case     	=	vocab_size
							_snake_case     	=	hidden_size
							_snake_case     	=	num_hidden_layers
							_snake_case     	=	num_attention_heads
							_snake_case     	=	intermediate_size
							_snake_case     	=	hidden_act
							_snake_case     	=	hidden_dropout_prob
							_snake_case     	=	attention_probs_dropout_prob
							_snake_case     	=	max_position_embeddings
							_snake_case     	=	type_vocab_size
							_snake_case     	=	type_sequence_label_size
							_snake_case     	=	initializer_range
							_snake_case     	=	num_labels
							_snake_case     	=	num_choices
							_snake_case     	=	scope






					def     __SCREAMING_SNAKE_CASE     (   self			):
							_snake_case     	=	ids_tensor([self.batch_size, self.seq_length],  self.vocab_size			)

							_snake_case     	=	None
							if self.use_input_mask:
									_snake_case     	=	random_attention_mask([self.batch_size, self.seq_length]			)

							_snake_case     	=	None
							if self.use_token_type_ids:
									_snake_case     	=	ids_tensor([self.batch_size, self.seq_length],  self.type_vocab_size			)

							_snake_case     	=	None
							_snake_case     	=	None
							_snake_case     	=	None
							if self.use_labels:
									_snake_case     	=	ids_tensor([self.batch_size],  self.type_sequence_label_size			)
									_snake_case     	=	ids_tensor([self.batch_size, self.seq_length],  self.num_labels			)
									_snake_case     	=	ids_tensor([self.batch_size],  self.num_choices			)
									_snake_case     	=	ids_tensor([self.batch_size, self.seq_length],  1			)

							_snake_case     	=	self.get_config()

							return (
							    config,
							    input_ids,
							    token_type_ids,
							    input_mask,
							    sequence_labels,
							    token_labels,
							    choice_labels,
							    fake_token_labels,
							)






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






					def     __SCREAMING_SNAKE_CASE     (   self			):
							(
							    (
							    _snake_case
							)	,   (
							    _snake_case
							)	,   (
							    _snake_case
							)	,   (
							    _snake_case
							)	,   (
							    _snake_case
							)	,   (
							    _snake_case
							)	,   (
							    _snake_case
							)	,   (
							    _snake_case
							)	,   
							)     	=	self.prepare_config_and_inputs()

							_snake_case     	=	True
							_snake_case     	=	floats_tensor([self.batch_size, self.seq_length, self.hidden_size]			)
							_snake_case     	=	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     __SCREAMING_SNAKE_CASE     (   self,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  ):
							_snake_case     	=	ElectraModel(config=__UpperCamelCase			)
							model.to(__UpperCamelCase			)
							model.eval()
							_snake_case     	=	model(__UpperCamelCase,  attention_mask=__UpperCamelCase,  token_type_ids=__UpperCamelCase			)
							_snake_case     	=	model(__UpperCamelCase,  token_type_ids=__UpperCamelCase			)
							_snake_case     	=	model(__UpperCamelCase			)
							self.parent.assertEqual(result.last_hidden_state.shape,  (self.batch_size, self.seq_length, self.hidden_size)			)






					def     __SCREAMING_SNAKE_CASE     (   self,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  ):
							_snake_case     	=	True
							_snake_case     	=	ElectraModel(__UpperCamelCase			)
							model.to(__UpperCamelCase			)
							model.eval()
							_snake_case     	=	model(
							    __UpperCamelCase,  attention_mask=__UpperCamelCase,  token_type_ids=__UpperCamelCase,  encoder_hidden_states=__UpperCamelCase,  encoder_attention_mask=__UpperCamelCase,  )
							_snake_case     	=	model(
							    __UpperCamelCase,  attention_mask=__UpperCamelCase,  token_type_ids=__UpperCamelCase,  encoder_hidden_states=__UpperCamelCase,  )
							_snake_case     	=	model(__UpperCamelCase,  attention_mask=__UpperCamelCase,  token_type_ids=__UpperCamelCase			)
							self.parent.assertEqual(result.last_hidden_state.shape,  (self.batch_size, self.seq_length, self.hidden_size)			)






					def     __SCREAMING_SNAKE_CASE     (   self,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  ):
							_snake_case     	=	ElectraForMaskedLM(config=__UpperCamelCase			)
							model.to(__UpperCamelCase			)
							model.eval()
							_snake_case     	=	model(__UpperCamelCase,  attention_mask=__UpperCamelCase,  token_type_ids=__UpperCamelCase,  labels=__UpperCamelCase			)
							self.parent.assertEqual(result.logits.shape,  (self.batch_size, self.seq_length, self.vocab_size)			)






					def     __SCREAMING_SNAKE_CASE     (   self,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  ):
							_snake_case     	=	ElectraForCausalLM(config=__UpperCamelCase			)
							model.to(__UpperCamelCase			)
							model.eval()
							_snake_case     	=	model(__UpperCamelCase,  attention_mask=__UpperCamelCase,  token_type_ids=__UpperCamelCase,  labels=__UpperCamelCase			)
							self.parent.assertEqual(result.logits.shape,  (self.batch_size, self.seq_length, self.vocab_size)			)






					def     __SCREAMING_SNAKE_CASE     (   self,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  ):
							_snake_case     	=	self.num_labels
							_snake_case     	=	ElectraForTokenClassification(config=__UpperCamelCase			)
							model.to(__UpperCamelCase			)
							model.eval()
							_snake_case     	=	model(__UpperCamelCase,  attention_mask=__UpperCamelCase,  token_type_ids=__UpperCamelCase,  labels=__UpperCamelCase			)
							self.parent.assertEqual(result.logits.shape,  (self.batch_size, self.seq_length, self.num_labels)			)






					def     __SCREAMING_SNAKE_CASE     (   self,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  ):
							_snake_case     	=	self.num_labels
							_snake_case     	=	ElectraForPreTraining(config=__UpperCamelCase			)
							model.to(__UpperCamelCase			)
							model.eval()
							_snake_case     	=	model(__UpperCamelCase,  attention_mask=__UpperCamelCase,  token_type_ids=__UpperCamelCase,  labels=__UpperCamelCase			)
							self.parent.assertEqual(result.logits.shape,  (self.batch_size, self.seq_length)			)






					def     __SCREAMING_SNAKE_CASE     (   self,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  ):
							_snake_case     	=	self.num_labels
							_snake_case     	=	ElectraForSequenceClassification(__UpperCamelCase			)
							model.to(__UpperCamelCase			)
							model.eval()
							_snake_case     	=	model(__UpperCamelCase,  attention_mask=__UpperCamelCase,  token_type_ids=__UpperCamelCase,  labels=__UpperCamelCase			)
							self.parent.assertEqual(result.logits.shape,  (self.batch_size, self.num_labels)			)






					def     __SCREAMING_SNAKE_CASE     (   self,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  ):
							_snake_case     	=	ElectraForQuestionAnswering(config=__UpperCamelCase			)
							model.to(__UpperCamelCase			)
							model.eval()
							_snake_case     	=	model(
							    __UpperCamelCase,  attention_mask=__UpperCamelCase,  token_type_ids=__UpperCamelCase,  start_positions=__UpperCamelCase,  end_positions=__UpperCamelCase,  )
							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     __SCREAMING_SNAKE_CASE     (   self,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase,  ):
							_snake_case     	=	self.num_choices
							_snake_case     	=	ElectraForMultipleChoice(config=__UpperCamelCase			)
							model.to(__UpperCamelCase			)
							model.eval()
							_snake_case     	=	input_ids.unsqueeze(1			).expand(-1,  self.num_choices,  -1			).contiguous()
							_snake_case     	=	token_type_ids.unsqueeze(1			).expand(-1,  self.num_choices,  -1			).contiguous()
							_snake_case     	=	input_mask.unsqueeze(1			).expand(-1,  self.num_choices,  -1			).contiguous()
							_snake_case     	=	model(
							    __UpperCamelCase,  attention_mask=__UpperCamelCase,  token_type_ids=__UpperCamelCase,  labels=__UpperCamelCase,  )
							self.parent.assertEqual(result.logits.shape,  (self.batch_size, self.num_choices)			)






					def     __SCREAMING_SNAKE_CASE     (   self			):
							_snake_case     	=	self.prepare_config_and_inputs()
							(
							    (
							    _snake_case
							)	,   (
							    _snake_case
							)	,   (
							    _snake_case
							)	,   (
							    _snake_case
							)	,   (
							    _snake_case
							)	,   (
							    _snake_case
							)	,   (
							    _snake_case
							)	,   (
							    _snake_case
							)	,   
							)     	=	config_and_inputs
							_snake_case     	=	{"input_ids": input_ids, "token_type_ids": token_type_ids, "attention_mask": input_mask}
							return config, inputs_dict





@require_torch
class 					lowerCamelCase_							(	UpperCAmelCase_,	UpperCAmelCase_,	unittest.TestCase							):




					'''simple docstring'''






					lowercase__   =			(
					    (
					        ElectraModel,
					        ElectraForPreTraining,
					        ElectraForMaskedLM,
					        ElectraForCausalLM,
					        ElectraForMultipleChoice,
					        ElectraForTokenClassification,
					        ElectraForSequenceClassification,
					        ElectraForQuestionAnswering,
					    )
					    if is_torch_available()
					    else ()
					)
					lowercase__   =			(
					    {
					        """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 {}
					)
					lowercase__   =			True






					def     __SCREAMING_SNAKE_CASE     (   self,  __UpperCamelCase,  __UpperCamelCase,  __UpperCamelCase=False			):
							_snake_case     	=	super()._prepare_for_class(__UpperCamelCase,  __UpperCamelCase,  return_labels=__UpperCamelCase			)

							if return_labels:
									if model_class in get_values(__UpperCamelCase			):
											_snake_case     	=	torch.zeros(
											    (self.model_tester.batch_size, self.model_tester.seq_length),  dtype=torch.long,  device=__UpperCamelCase			)
							return inputs_dict






					def     __SCREAMING_SNAKE_CASE     (   self			):
							_snake_case     	=	ElectraModelTester(self			)
							_snake_case     	=	ConfigTester(self,  config_class=__UpperCamelCase,  hidden_size=37			)






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






					def     __SCREAMING_SNAKE_CASE     (   self			):
							_snake_case     	=	self.model_tester.prepare_config_and_inputs()
							self.model_tester.create_and_check_electra_model(*__UpperCamelCase			)






					def     __SCREAMING_SNAKE_CASE     (   self			):
							_snake_case     	=	self.model_tester.prepare_config_and_inputs_for_decoder()
							self.model_tester.create_and_check_electra_model_as_decoder(*__UpperCamelCase			)






					def     __SCREAMING_SNAKE_CASE     (   self			):
							_snake_case     	=	self.model_tester.prepare_config_and_inputs()
							for type in ["absolute", "relative_key", "relative_key_query"]:
									_snake_case     	=	type
									self.model_tester.create_and_check_electra_model(*__UpperCamelCase			)






					def     __SCREAMING_SNAKE_CASE     (   self			):
							_snake_case     	=	self.model_tester.prepare_config_and_inputs()
							self.model_tester.create_and_check_electra_for_masked_lm(*__UpperCamelCase			)






					def     __SCREAMING_SNAKE_CASE     (   self			):
							_snake_case     	=	self.model_tester.prepare_config_and_inputs()
							self.model_tester.create_and_check_electra_for_token_classification(*__UpperCamelCase			)






					def     __SCREAMING_SNAKE_CASE     (   self			):
							_snake_case     	=	self.model_tester.prepare_config_and_inputs()
							self.model_tester.create_and_check_electra_for_pretraining(*__UpperCamelCase			)






					def     __SCREAMING_SNAKE_CASE     (   self			):
							_snake_case     	=	self.model_tester.prepare_config_and_inputs()
							self.model_tester.create_and_check_electra_for_sequence_classification(*__UpperCamelCase			)






					def     __SCREAMING_SNAKE_CASE     (   self			):
							_snake_case     	=	self.model_tester.prepare_config_and_inputs()
							self.model_tester.create_and_check_electra_for_question_answering(*__UpperCamelCase			)






					def     __SCREAMING_SNAKE_CASE     (   self			):
							_snake_case     	=	self.model_tester.prepare_config_and_inputs()
							self.model_tester.create_and_check_electra_for_multiple_choice(*__UpperCamelCase			)






					@slow
					def     __SCREAMING_SNAKE_CASE     (   self			):
							for model_name in ELECTRA_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
									_snake_case     	=	ElectraModel.from_pretrained(__UpperCamelCase			)
									self.assertIsNotNone(__UpperCamelCase			)






					def     __SCREAMING_SNAKE_CASE     (   self			):
							_snake_case     	=	self.model_tester.prepare_config_and_inputs_for_decoder()
							self.model_tester.create_and_check_electra_for_causal_lm(*__UpperCamelCase			)





@require_torch
class 					lowerCamelCase_							(	unittest.TestCase							):




					'''simple docstring'''






					@slow
					def     __SCREAMING_SNAKE_CASE     (   self			):
							_snake_case     	=	ElectraModel.from_pretrained("google/electra-small-discriminator"			)
							_snake_case     	=	torch.tensor([[0, 345, 232, 328, 740, 140, 1_695, 69, 6_078, 1_588, 2]]			)
							_snake_case     	=	torch.tensor([[0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]			)
							_snake_case     	=	model(__UpperCamelCase,  attention_mask=__UpperCamelCase			)[0]
							_snake_case     	=	torch.Size((1, 11, 256)			)
							self.assertEqual(output.shape,  __UpperCamelCase			)
							_snake_case     	=	torch.tensor(
							    [[[0.44_71, 0.68_21, -0.32_65], [0.46_27, 0.52_55, -0.36_68], [0.45_32, 0.33_13, -0.43_44]]]			)

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











'''simple docstring'''







import logging
import os
import sys
from dataclasses import dataclass, field
from typing import Optional

import transformers
from transformers import (
    AutoConfig,
    AutoModelForQuestionAnswering,
    AutoTokenizer,
    DataCollatorWithPadding,
    HfArgumentParser,
    SquadDataset,
    Trainer,
    TrainingArguments,
)
from transformers import SquadDataTrainingArguments as DataTrainingArguments
from transformers.trainer_utils import is_main_process


_lowerCamelCase							:						Tuple							     =  logging.getLogger(__name__)





@dataclass
class 					lowerCamelCase_							:




					'''simple docstring'''






					lowercase__   =			field(
					    metadata={"""help""": """Path to pretrained model or model identifier from huggingface.co/models"""}							)
					lowercase__   =			field(
					    default=UpperCAmelCase_,	metadata={"""help""": """Pretrained config name or path if not the same as model_name"""}							)
					lowercase__   =			field(
					    default=UpperCAmelCase_,	metadata={"""help""": """Pretrained tokenizer name or path if not the same as model_name"""}							)
					lowercase__   =			field(default=UpperCAmelCase_,	metadata={"""help""": """Set this flag to use fast tokenization."""}							)
					# If you want to tweak more attributes on your tokenizer, you should do it in a distinct script,
					# or just modify its tokenizer_config.json.
					lowercase__   =			field(
					    default=UpperCAmelCase_,	metadata={"""help""": """Where do you want to store the pretrained models downloaded from huggingface.co"""},	)






def 		_lowercase		(     ):



		'''simple docstring'''







		_snake_case     	=	HfArgumentParser((ModelArguments, DataTrainingArguments, TrainingArguments)  )

		if len(sys.argv  ) == 2 and sys.argv[1].endswith(".json"  ):
				# If we pass only one argument to the script and it's the path to a json file,
				# let's parse it to get our arguments.
				_snake_case	,   _snake_case	,   _snake_case     	=	parser.parse_json_file(json_file=os.path.abspath(sys.argv[1]  )  )
		else:
				_snake_case	,   _snake_case	,   _snake_case     	=	parser.parse_args_into_dataclasses()

		if (
		    os.path.exists(training_args.output_dir  )
		    and os.listdir(training_args.output_dir  )
		    and training_args.do_train
		    and not training_args.overwrite_output_dir
		):
				raise ValueError(
				    f'''Output directory ({training_args.output_dir}) already exists and is not empty. Use'''
				    " --overwrite_output_dir to overcome."  )

		# Setup logging
		logging.basicConfig(
		    format="%(asctime)s - %(levelname)s - %(name)s - %(message)s"						,							datefmt="%m/%d/%Y %H:%M:%S"						,							level=logging.INFO if training_args.local_rank in [-1, 0] else logging.WARN						,							)
		logger.warning(
		    "Process rank: %s, device: %s, n_gpu: %s, distributed training: %s, 16-bits training: %s"						,							training_args.local_rank						,							training_args.device						,							training_args.n_gpu						,							bool(training_args.local_rank != -1  )						,							training_args.fpaa						,							)
		# Set the verbosity to info of the Transformers logger (on main process only):
		if is_main_process(training_args.local_rank  ):
				transformers.utils.logging.set_verbosity_info()
				transformers.utils.logging.enable_default_handler()
				transformers.utils.logging.enable_explicit_format()
		logger.info("Training/evaluation parameters %s"						,							lowercase_  )

		# Prepare Question-Answering task
		# Load pretrained model and tokenizer
		#
		# Distributed training:
		# The .from_pretrained methods guarantee that only one local process can concurrently
		# download model & vocab.

		_snake_case     	=	AutoConfig.from_pretrained(
		    model_args.config_name if model_args.config_name else model_args.model_name_or_path						,							cache_dir=model_args.cache_dir						,							)
		_snake_case     	=	AutoTokenizer.from_pretrained(
		    model_args.tokenizer_name if model_args.tokenizer_name else model_args.model_name_or_path						,							cache_dir=model_args.cache_dir						,							use_fast=lowercase_						,							)
		_snake_case     	=	AutoModelForQuestionAnswering.from_pretrained(
		    model_args.model_name_or_path						,							from_tf=bool(".ckpt" in model_args.model_name_or_path  )						,							config=lowercase_						,							cache_dir=model_args.cache_dir						,							)

		# Get datasets
		_snake_case     	=	hasattr(model.config						,							"lang2id"  )
		_snake_case     	=	(
		    SquadDataset(
		        lowercase_						,							tokenizer=lowercase_						,							is_language_sensitive=lowercase_						,							cache_dir=model_args.cache_dir  )
		    if training_args.do_train
		    else None
		)
		_snake_case     	=	(
		    SquadDataset(
		        lowercase_						,							tokenizer=lowercase_						,							mode="dev"						,							is_language_sensitive=lowercase_						,							cache_dir=model_args.cache_dir						,							)
		    if training_args.do_eval
		    else None
		)

		# Data collator
		_snake_case     	=	DataCollatorWithPadding(lowercase_						,							pad_to_multiple_of=8  ) if training_args.fpaa else None

		# Initialize our Trainer
		_snake_case     	=	Trainer(
		    model=lowercase_						,							args=lowercase_						,							train_dataset=lowercase_						,							eval_dataset=lowercase_						,							data_collator=lowercase_						,							)

		# Training
		if training_args.do_train:
				trainer.train(
				    model_path=model_args.model_name_or_path if os.path.isdir(model_args.model_name_or_path  ) else None  )
				trainer.save_model()
				# For convenience, we also re-save the tokenizer to the same directory,
				# so that you can share your model easily on huggingface.co/models =)
				if trainer.is_world_master():
						tokenizer.save_pretrained(training_args.output_dir  )






def 		_lowercase		(     lowercase_  ):



		'''simple docstring'''







		main()


if __name__ == "__main__":
						main()





