

import argparse
import os

import torch

from transformers.utils import WEIGHTS_NAME


__UpperCamelCase					:		Dict	  =						['small', 'medium', 'large']

__UpperCamelCase					:		Dict	  =						'lm_head.decoder.weight'
__UpperCamelCase					:		Union[str, Any]	  =						'lm_head.weight'
def      a_ (      _A      ,   _A  )			->			Optional[int]:







				"""simple docstring"""
				snake_case__									=     torch.load(_lowerCamelCase  )
				snake_case__									=     d.pop(_lowerCamelCase  )
				os.makedirs(_lowerCamelCase      ,   exist_ok=_lowerCamelCase  )
				torch.save(_lowerCamelCase      ,   os.path.join(_lowerCamelCase      ,   _lowerCamelCase  )  )


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












from __future__ import annotations
def      a_ (      _A  )			->			bool:







				"""simple docstring"""
				return len(set(_A  )  ) == len(_A  )


if __name__ == "__main__":
							import doctest

							doctest.testmod()




