




import argparse

import torch

from transformers import RemBertConfig, RemBertModel, load_tf_weights_in_rembert
from transformers.utils import logging


logging.set_verbosity_info()





def 		__A		(	__lowerCamelCase							,			__lowerCamelCase							,			__lowerCamelCase    )      ->       int:
	# Initialise PyTorch model
	a										=							RemBertConfig.from_json_file(__lowerCamelCase    )
	print("""Building PyTorch model from configuration: {}""".format(str(__lowerCamelCase    )    )    )
	a										=							RemBertModel(__lowerCamelCase    )

	# Load weights from tf checkpoint
	load_tf_weights_in_rembert(__lowerCamelCase							,			__lowerCamelCase							,			__lowerCamelCase    )

	# Save pytorch-model
	print("""Save PyTorch model to {}""".format(__lowerCamelCase    )    )
	torch.save(model.state_dict()							,			__lowerCamelCase    )


if __name__ == "__main__":
		__UpperCamelCase					:       Dict    					=      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(
		    "--rembert_config_file",
		    default=None,
		    type=str,
		    required=True,
		    help=(
		        "The config json file corresponding to the pre-trained RemBERT 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."
		)
		__UpperCamelCase					:       Union[str, Any]    					=      parser.parse_args()
		convert_rembert_tf_checkpoint_to_pytorch(args.tf_checkpoint_path, args.rembert_config_file, args.pytorch_dump_path)







def 		__A		(	__lowerCamelCase    )      ->       int:
	a										=							0
	while num > 0:
		digit_sum += num % 10
		num //= 10
	return digit_sum





def 		__A		(	__lowerCamelCase = 100    )      ->       int:
	a										=							1
	a										=							2

	for i in range(2							,			max_n + 1    ):
		a										=							pre_numerator
		a										=							2 * i // 3 if i % 3 == 0 else 1
		a										=							cur_numerator
		a										=							e_cont * pre_numerator + temp

	return sum_digits(__lowerCamelCase    )


if __name__ == "__main__":
		print(F'{solution() = }')

