

'''simple docstring'''





import sys

UpperCamelCase_    						=       (
    """73167176531330624919225119674426574742355349194934"""
    """96983520312774506326239578318016984801869478851843"""
    """85861560789112949495459501737958331952853208805511"""
    """12540698747158523863050715693290963295227443043557"""
    """66896648950445244523161731856403098711121722383113"""
    """62229893423380308135336276614282806444486645238749"""
    """30358907296290491560440772390713810515859307960866"""
    """70172427121883998797908792274921901699720888093776"""
    """65727333001053367881220235421809751254540594752243"""
    """52584907711670556013604839586446706324415722155397"""
    """53697817977846174064955149290862569321978468622482"""
    """83972241375657056057490261407972968652414535100474"""
    """82166370484403199890008895243450658541227588666881"""
    """16427171479924442928230863465674813919123162824586"""
    """17866458359124566529476545682848912883142607690042"""
    """24219022671055626321111109370544217506941658960408"""
    """07198403850962455444362981230987879927244284909188"""
    """84580156166097919133875499200524063689912560717606"""
    """05886116467109405077541002256983155200055935729725"""
    """71636269561882670428252483600823257530420752963450"""
)






def 				_lowerCAmelCase			(   __magic_name__						:     str = N						)				->  int:
						lowercase :							Dict    		=-sys.maxsize - 1
						for i in range(len(__magic_name__						) - 12						):
												lowercase :							Any    		=1
												for j in range(13						):
																		product *= int(n[i + j]						)
												if product > largest_product:
																		lowercase :							int    		=product
						return largest_product


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







import argparse
import os

import torch

from transformers import (
    XLNetConfig,
    XLNetForQuestionAnswering,
    XLNetForSequenceClassification,
    XLNetLMHeadModel,
    load_tf_weights_in_xlnet,
)
from transformers.utils import CONFIG_NAME, WEIGHTS_NAME, logging


__A							={
    '''cola''': 2,
    '''mnli''': 3,
    '''mrpc''': 2,
    '''sst-2''': 2,
    '''sts-b''': 1,
    '''qqp''': 2,
    '''qnli''': 2,
    '''rte''': 2,
    '''wnli''': 2,
}


logging.set_verbosity_info()





def      lowerCamelCase_					(							lowerCamelCase__      ,					lowerCamelCase__      ,					lowerCamelCase__      ,					lowerCamelCase__=None       ):
				# Initialise PyTorch model
				lowerCamelCase_         =     XLNetConfig.from_json_file(lowerCamelCase__       )

				lowerCamelCase_         =     finetuning_task.lower() if finetuning_task is not None else ""
				if finetuning_task in GLUE_TASKS_NUM_LABELS:
								print(F'Building PyTorch XLNetForSequenceClassification model from configuration: {config}'       )
								lowerCamelCase_         =     finetuning_task
								lowerCamelCase_         =     GLUE_TASKS_NUM_LABELS[finetuning_task]
								lowerCamelCase_         =     XLNetForSequenceClassification(lowerCamelCase__       )
				elif "squad" in finetuning_task:
								lowerCamelCase_         =     finetuning_task
								lowerCamelCase_         =     XLNetForQuestionAnswering(lowerCamelCase__       )
				else:
								lowerCamelCase_         =     XLNetLMHeadModel(lowerCamelCase__       )

				# Load weights from tf checkpoint
				load_tf_weights_in_xlnet(lowerCamelCase__      ,					lowerCamelCase__      ,					lowerCamelCase__       )

				# Save pytorch-model
				lowerCamelCase_         =     os.path.join(lowerCamelCase__      ,					lowerCamelCase__       )
				lowerCamelCase_         =     os.path.join(lowerCamelCase__      ,					lowerCamelCase__       )
				print(F'Save PyTorch model to {os.path.abspath(lowerCamelCase__       )}'       )
				torch.save(model.state_dict()      ,					lowerCamelCase__       )
				print(F'Save configuration file to {os.path.abspath(lowerCamelCase__       )}'       )
				with open(lowerCamelCase__      ,					"w"      ,					encoding="utf-8"       ) as f:
								f.write(config.to_json_string()       )


if __name__ == "__main__":
			__A							=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(
			    '''--xlnet_config_file''',
			    default=None,
			    type=str,
			    required=True,
			    help=(
			        '''The config json file corresponding to the pre-trained XLNet model. \n'''
			        '''This specifies the model architecture.'''
			    ),
			)
			parser.add_argument(
			    '''--pytorch_dump_folder_path''',
			    default=None,
			    type=str,
			    required=True,
			    help='''Path to the folder to store the PyTorch model or dataset/vocab.''',
			)
			parser.add_argument(
			    '''--finetuning_task''',
			    default=None,
			    type=str,
			    help='''Name of a task on which the XLNet TensorFlow model was fine-tuned''',
			)
			__A							=parser.parse_args()
			print(args)

			convert_xlnet_checkpoint_to_pytorch(
			    args.tf_checkpoint_path, args.xlnet_config_file, args.pytorch_dump_folder_path, args.finetuning_task
			)


