
'''simple docstring'''




def       __UpperCAmelCase						(  lowerCamelCase_)							->     int:
		UpperCamelCase__				:					str					=					[1]

		UpperCamelCase__,	UpperCamelCase__,	UpperCamelCase__				:					Optional[Any]					=					0, 0, 0
		UpperCamelCase__				:					int					=					ugly_nums[ia] * 2
		UpperCamelCase__				:					str					=					ugly_nums[ia] * 3
		UpperCamelCase__				:					List[str]					=					ugly_nums[ia] * 5

		for _ in range(1     ,      __SCREAMING_SNAKE_CASE):
				UpperCamelCase__				:					Tuple					=					min(__SCREAMING_SNAKE_CASE     ,      __SCREAMING_SNAKE_CASE     ,      __SCREAMING_SNAKE_CASE)
				ugly_nums.append(__SCREAMING_SNAKE_CASE)
				if next_num == next_a:
						ia += 1
						UpperCamelCase__				:					Tuple					=					ugly_nums[ia] * 2
				if next_num == next_a:
						ia += 1
						UpperCamelCase__				:					Optional[Any]					=					ugly_nums[ia] * 3
				if next_num == next_a:
						ia += 1
						UpperCamelCase__				:					str					=					ugly_nums[ia] * 5
		return ugly_nums[-1]


if __name__ == "__main__":
		from doctest import testmod

		testmod(verbose=True)
		print(f'''{ugly_numbers(200) = }''')












'''simple docstring'''




from typing import Union

import fire
import torch
from tqdm import tqdm







def       __UpperCAmelCase						(  lowerCamelCase_     ,      lowerCamelCase_ = "cpu"     ,      lowerCamelCase_ = None)							->     None:
		UpperCamelCase__				:					List[Any]					=					torch.load(lowerCamelCase_     ,      map_location=lowerCamelCase_)
		for k, v in tqdm(state_dict.items()):
				if not isinstance(lowerCamelCase_     ,      torch.Tensor):
						raise TypeError('FP16 conversion only works on paths that are saved state dicts, like pytorch_model.bin')
				UpperCamelCase__				:					int					=					v.half()
		if save_path is None:  # overwrite src_path
				UpperCamelCase__				:					List[Any]					=					src_path
		torch.save(lowerCamelCase_     ,      lowerCamelCase_)


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




