

import argparse
import os

import torch

from transformers.utils import WEIGHTS_NAME


a		=["""small""", """medium""", """large"""]

a		="""lm_head.decoder.weight"""
a		="""lm_head.weight"""






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


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







# This is the module that test_patching.py uses to test patch_submodule()

import os  # noqa: this is just for tests
import os as renamed_os  # noqa: this is just for tests
from os import path  # noqa: this is just for tests
from os import path as renamed_path  # noqa: this is just for tests
from os.path import join  # noqa: this is just for tests
from os.path import join as renamed_join  # noqa: this is just for tests


a		=open  # noqa: we just need to have a builtin inside this module to test it properly




