





'''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  __a			(  UpperCAmelCase							,      UpperCAmelCase							,      UpperCAmelCase     )   ->List[str]:



	"""simple docstring"""







	A					=   ConvBertConfig.from_json_file(_SCREAMING_SNAKE_CASE     )
	A					=   ConvBertModel(_SCREAMING_SNAKE_CASE     )

	A					=   load_tf_weights_in_convbert(_SCREAMING_SNAKE_CASE							,      _SCREAMING_SNAKE_CASE							,      _SCREAMING_SNAKE_CASE     )
	model.save_pretrained(_SCREAMING_SNAKE_CASE     )

	A					=   TFConvBertModel.from_pretrained(_SCREAMING_SNAKE_CASE							,      from_pt=_SCREAMING_SNAKE_CASE     )
	tf_model.save_pretrained(_SCREAMING_SNAKE_CASE     )


if __name__ == "__main__":
				_lowerCamelCase					:						Union[str, Any]					     =							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.'
				)
				_lowerCamelCase					:						Dict					     =							parser.parse_args()
				convert_orig_tfa_checkpoint_to_pytorch(args.tf_checkpoint_path, args.convbert_config_file, args.pytorch_dump_path)





"""simple docstring"""
import math







def     _a					(   _SCREAMING_SNAKE_CASE					)     ->					list[int]:
							if not isinstance(_SCREAMING_SNAKE_CASE					,			_SCREAMING_SNAKE_CASE					):
														snake_case_     							=		f"""Input value of [number={number}] must be an integer"""
														raise TypeError(_SCREAMING_SNAKE_CASE					)
							if number < 1:
														snake_case_     							=		f"""Input value of [number={number}] must be a positive integer"""
														raise ValueError(_SCREAMING_SNAKE_CASE					)
							snake_case_     							=		[number]
							while number != 1:
														if number % 2 == 0:
																					snake_case_     							=		math.floor(math.sqrt(_SCREAMING_SNAKE_CASE					)					)
														else:
																					snake_case_     							=		math.floor(
																					    math.sqrt(_SCREAMING_SNAKE_CASE					) * math.sqrt(_SCREAMING_SNAKE_CASE					) * math.sqrt(_SCREAMING_SNAKE_CASE					)					)
														sequence.append(_SCREAMING_SNAKE_CASE					)
							return sequence


if __name__ == "__main__":
				import doctest

				doctest.testmod()



