"""simple docstring"""



def 	_lowerCamelCase(	a = 3   ,    a = 7   ,    a = 1_0_0_0_0_0_0				):
       __a       =    0
       __a       =    1

       for current_denominator in range(1   ,    limit + 1				):
              __a       =    current_denominator * numerator // denominator
              if current_denominator % denominator == 0:
                     current_numerator -= 1
              if current_numerator * max_denominator > current_denominator * max_numerator:
                     __a       =    current_numerator
                     __a       =    current_denominator
       return max_numerator


if __name__ == "__main__":
   print(solution(numerator=3, denominator=7, limit=1000000))

"""simple docstring"""



from typing import Union

import fire
import torch
from tqdm import tqdm



def 	_lowerCamelCase(	a   ,    a = "cpu"   ,    a = None				):
       __a       =    torch.load(a   ,    map_location=a				)
       for k, v in tqdm(state_dict.items()				):
              if not isinstance(a   ,    torch.Tensor				):
                     raise TypeError("FP16 conversion only works on paths that are saved state dicts, like pytorch_model.bin"				)
              __a       =    v.half()
       if save_path is None:  # overwrite src_path
              __a       =    src_path
       torch.save(a   ,    a				)


if __name__ == "__main__":
   fire.Fire(convert)
