'''simple docstring'''




import argparse

from transformers import ConvBertConfig, ConvBertModel, TFConvBertModel, load_tf_weights_in_convbert
from transformers.utils import logging


logging.set_verbosity_info()






def     snake_case__							(      _A: str				,       _A: Union[str, Any]				,       _A: int			)   ->     str:

		'''simple docstring'''


		lowerCAmelCase        =  ConvBertConfig.from_json_file(_A			)
		lowerCAmelCase        =  ConvBertModel(_A			)

		lowerCAmelCase        =  load_tf_weights_in_convbert(_A				,       _A				,       _A			)
		model.save_pretrained(_A			)

		lowerCAmelCase        =  TFConvBertModel.from_pretrained(_A				,       from_pt=_A			)
		tf_model.save_pretrained(_A			)


if __name__ == "__main__":
						__lowercase				   =  argparse.ArgumentParser()
						# Required parameters
						parser.add_argument(
						    '''--tf_checkpoint_path''', default=None, type=str, required=True, help='''Path to the TensorFlow checkpoint path.'''
						)
						parser.add_argument(
						    '''--convbert_config_file''',
						    default=None,
						    type=str,
						    required=True,
						    help=(
						        '''The config json file corresponding to the pre-trained ConvBERT model. \n'''
						        '''This specifies the model architecture.'''
						    ),
						)
						parser.add_argument(
						    '''--pytorch_dump_path''', default=None, type=str, required=True, help='''Path to the output PyTorch model.'''
						)
						__lowercase				   =  parser.parse_args()
						convert_orig_tfa_checkpoint_to_pytorch(args.tf_checkpoint_path, args.convbert_config_file, args.pytorch_dump_path)





'''simple docstring'''




from ..utils import DummyObject, requires_backends






class     a__( metaclass=lowerCAmelCase__     ):


			'''simple docstring'''






			UpperCAmelCase_      :					Optional[int]								=	['''torch''', '''transformers''', '''k_diffusion''']



			def __init__(       self	,   *__lowerCAmelCase	,   **__lowerCAmelCase):




					"""simple docstring"""


					requires_backends(self	,   ["""torch""", """transformers""", """k_diffusion"""])



			@classmethod
			def 							a_	(       cls	,   *__lowerCAmelCase	,   **__lowerCAmelCase):




					"""simple docstring"""


					requires_backends(cls	,   ["""torch""", """transformers""", """k_diffusion"""])







			@classmethod
			def 							a_	(       cls	,   *__lowerCAmelCase	,   **__lowerCAmelCase):




					"""simple docstring"""


					requires_backends(cls	,   ["""torch""", """transformers""", """k_diffusion"""])




