


'''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 lowerCamelCase__     (		__lowerCamelCase			:				str			,       __lowerCamelCase			:				str				):







   '''simple docstring'''




   _UpperCAmelCase  :  Tuple				       =torch.load(__lowerCamelCase				)
   _UpperCAmelCase  :  Any				       =d.pop(__lowerCamelCase				)
   os.makedirs(__lowerCamelCase			,       exist_ok=__lowerCamelCase				)
   torch.save(__lowerCamelCase			,       os.path.join(__lowerCamelCase			,       __lowerCamelCase				)				)


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 fractions import Fraction





def lowerCamelCase__     (		__lowerCamelCase			:				int			,       __lowerCamelCase			:				int				):







   '''simple docstring'''




   return (
       num != den and num % 1_0 == den // 1_0 and (num // 1_0) / (den % 1_0) == num / den
   )





def lowerCamelCase__     (		__lowerCamelCase			:				int				):







   '''simple docstring'''




   _UpperCAmelCase  :  Optional[int]				       =[]
   _UpperCAmelCase  :  Union[str, Any]				       =1_1
   _UpperCAmelCase  :  Union[str, Any]				       =int('1' + '0' * digit_len				)
   for num in range(__lowerCamelCase			,       __lowerCamelCase				):
      while den <= 9_9:
         if (num != den) and (num % 1_0 == den // 1_0) and (den % 1_0 != 0):
            if is_digit_cancelling(__lowerCamelCase			,       __lowerCamelCase				):
               solutions.append(f"{num}/{den}"				)
         den += 1
      num += 1
      _UpperCAmelCase  :  Optional[int]				       =1_0
   return solutions





def lowerCamelCase__     (		__lowerCamelCase			:				int = 2				):







   '''simple docstring'''




   _UpperCAmelCase  :  Any				       =1.0
   for fraction in fraction_list(__lowerCamelCase				):
      _UpperCAmelCase  :  List[str]				       =Fraction(__lowerCamelCase				)
      result *= frac.denominator / frac.numerator
   return int(__lowerCamelCase				)


if __name__ == "__main__":
 print(solution())

