


import argparse

from transformers import CanineConfig, CanineModel, CanineTokenizer, load_tf_weights_in_canine
from transformers.utils import logging


logging.set_verbosity_info()
def 							_UpperCAmelCase    (UpperCamelCase__					:  str    ,							UpperCamelCase__					:  Optional[int]						):
       # Initialize PyTorch model
       _A				:	Dict       =			CanineConfig()
       _A				:	List[str]       =			CanineModel(UpperCamelCase__						)
       model.eval()

       print(f"Building PyTorch model from configuration: {config}"						)

       # Load weights from tf checkpoint
       load_tf_weights_in_canine(UpperCamelCase__    ,							UpperCamelCase__    ,							UpperCamelCase__						)

       # Save pytorch-model (weights and configuration)
       print(f"Save PyTorch model to {pytorch_dump_path}"						)
       model.save_pretrained(UpperCamelCase__						)

       # Save tokenizer files
       _A				:	int       =			CanineTokenizer()
       print(f"Save tokenizer files to {pytorch_dump_path}"						)
       tokenizer.save_pretrained(UpperCamelCase__						)


if __name__ == "__main__":
    lowerCAmelCase__						=			argparse.ArgumentParser()
    # Required parameters
    parser.add_argument(
        '--tf_checkpoint_path',
        default=None,
        type=str,
        required=True,
        help='Path to the TensorFlow checkpoint. Should end with model.ckpt',
    )
    parser.add_argument(
        '--pytorch_dump_path',
        default=None,
        type=str,
        required=True,
        help='Path to a folder where the PyTorch model will be placed.',
    )
    lowerCAmelCase__						=			parser.parse_args()
    convert_tf_checkpoint_to_pytorch(args.tf_checkpoint_path, args.pytorch_dump_path)




from itertools import permutations
def 							_UpperCAmelCase    ():
       _A				:	List[Any]       =			list(map("".join    ,							permutations("0123456789"						)						)						)
       return result[999999]


if __name__ == "__main__":
    print(solution())
