



"""simple docstring"""





import argparse
import os

import torch

from transformers.utils import WEIGHTS_NAME


lowercase  							=					['''small''', '''medium''', '''large''']

lowercase  							=					'''lm_head.decoder.weight'''
lowercase  							=					'''lm_head.weight'''




def 	UpperCAmelCase     (		A	:						str     ,				A	:						str       ):

		'''simple docstring'''


		_UpperCAmelCase							 =		torch.load(A       )
		_UpperCAmelCase							 =		d.pop(A       )
		os.makedirs(A     ,				exist_ok=A       )
		torch.save(A     ,				os.path.join(A     ,				A       )       )


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







"""simple docstring"""





from __future__ import annotations

from cmath import sqrt




def 	UpperCAmelCase     (		A	:						int     ,				A	:						int     ,				A	:						int       ):

		'''simple docstring'''


		if a == 0:
				raise ValueError('Coefficient \'a\' must not be zero.'       )
		_UpperCAmelCase							 =		b * b - 4 * a * c

		_UpperCAmelCase							 =		(-b + sqrt(A       )) / (2 * a)
		_UpperCAmelCase							 =		(-b - sqrt(A       )) / (2 * a)

		return (
		    root_a.real if not root_a.imag else root_a,
		    root_a.real if not root_a.imag else root_a,
		)




def 	UpperCAmelCase     (		):

		'''simple docstring'''


		_UpperCAmelCase ,					_UpperCAmelCase							 =		quadratic_roots(a=5     ,				b=6     ,				c=1       )
		print(f'The solutions are: {solutiona} and {solutiona}'       )


if __name__ == "__main__":
					main()


