




"""simple docstring"""
import argparse
import os

import torch

from transformers.utils import WEIGHTS_NAME


a_				:    Any										=     ['''small''', '''medium''', '''large''']

a_				:    Optional[Any]										=     '''lm_head.decoder.weight'''
a_				:    int										=     '''lm_head.weight'''





def 						UpperCAmelCase				(			A__:    int							,				A__:    Tuple     )  ->     int:
			__lowerCamelCase					:	List[Any]	       =				torch.load(__SCREAMING_SNAKE_CASE     )
			__lowerCamelCase					:	List[Any]	       =				d.pop(__SCREAMING_SNAKE_CASE     )
			os.makedirs(__SCREAMING_SNAKE_CASE							,				exist_ok=__SCREAMING_SNAKE_CASE     )
			torch.save(__SCREAMING_SNAKE_CASE							,				os.path.join(__SCREAMING_SNAKE_CASE							,				__SCREAMING_SNAKE_CASE     )     )


if __name__ == "__main__":
							a_				:    Union[str, Any]										=     argparse.ArgumentParser()
							parser.add_argument('''--dialogpt_path''', default='''.''', type=str)
							a_				:    Dict										=     parser.parse_args()
							for MODEL in DIALOGPT_MODELS:
														a_				:    int										=     os.path.join(args.dialogpt_path, F"""{MODEL}_ft.pkl""")
														a_				:    Union[str, Any]										=     F"""./DialoGPT-{MODEL}"""
														convert_dialogpt_checkpoint(
														    checkpoint_path,
														    pytorch_dump_folder_path,
														)









"""simple docstring"""
import random
from typing import Any





def 						UpperCAmelCase				(			A__:    list     )  ->     list[Any]:
			for _ in range(len(A__     )     ):
						__lowerCamelCase					:	List[Any]	       =				random.randint(0							,				len(A__     ) - 1     )
						__lowerCamelCase					:	Optional[Any]	       =				random.randint(0							,				len(A__     ) - 1     )
						__lowerCamelCase       ,      __lowerCamelCase					:	Any	       =				data[b], data[a]
			return data


if __name__ == "__main__":
					a_				:    Any										=     [0, 1, 2, 3, 4, 5, 6, 7]
					a_				:    int										=     ['''python''', '''says''', '''hello''', '''!''']
					print('''Fisher-Yates Shuffle:''')
					print('''List''', integers, strings)
					print('''FY Shuffle''', fisher_yates_shuffle(integers), fisher_yates_shuffle(strings))



