





import operator as op


__UpperCamelCase:	Optional[int] = """scaler.pt"""
__UpperCamelCase:	int = """pytorch_model"""
__UpperCamelCase:	Union[str, Any] = """random_states"""
__UpperCamelCase:	List[Any] = """optimizer"""
__UpperCamelCase:	List[str] = """scheduler"""
__UpperCamelCase:	Any = """pytorch_model.bin"""
__UpperCamelCase:	Any = """pytorch_model.bin.index.json"""
__UpperCamelCase:	int = """model.safetensors"""
__UpperCamelCase:	List[Any] = """model.safetensors.index.json"""
__UpperCamelCase:	int = """1.10.2"""
__UpperCamelCase:	List[Any] = """py38"""
__UpperCamelCase:	Any = """4.17.0"""
__UpperCamelCase:	int = ["""ml.p3.16xlarge""", """ml.p3dn.24xlarge""", """ml.p4dn.24xlarge"""]
__UpperCamelCase:	Optional[Any] = ["""FULL_SHARD""", """SHARD_GRAD_OP""", """NO_SHARD""", """HYBRID_SHARD""", """HYBRID_SHARD_ZERO2"""]
__UpperCamelCase:	List[str] = ["""TRANSFORMER_BASED_WRAP""", """SIZE_BASED_WRAP""", """NO_WRAP"""]
__UpperCamelCase:	List[Any] = ["""BACKWARD_PRE""", """BACKWARD_POST""", """NO_PREFETCH"""]
__UpperCamelCase:	Union[str, Any] = ["""FULL_STATE_DICT""", """LOCAL_STATE_DICT""", """SHARDED_STATE_DICT"""]
__UpperCamelCase:	str = """2.0.1"""
__UpperCamelCase:	List[Any] = ["""pdsh""", """standard""", """openmpi""", """mvapich"""]
__UpperCamelCase:	List[Any] = ["""default""", """reduce-overhead""", """max-autotune"""]

__UpperCamelCase:	Optional[int] = {""">""": op.gt, """>=""": op.ge, """==""": op.eq, """!=""": op.ne, """<=""": op.le, """<""": op.lt}

# These are the args for `torch.distributed.launch` for pytorch < 1.9
__UpperCamelCase:	List[Any] = [
    """nnodes""",
    """nproc_per_node""",
    """rdzv_backend""",
    """rdzv_endpoint""",
    """rdzv_id""",
    """rdzv_conf""",
    """standalone""",
    """max_restarts""",
    """monitor_interval""",
    """start_method""",
    """role""",
    """module""",
    """m""",
    """no_python""",
    """run_path""",
    """log_dir""",
    """r""",
    """redirects""",
    """t""",
    """tee""",
    """node_rank""",
    """master_addr""",
    """master_port""",
]

__UpperCamelCase:	Optional[int] = ["""DEEPSPEED""", """MULTI_GPU""", """FSDP""", """MEGATRON_LM"""]
__UpperCamelCase:	Union[str, Any] = ["""DEEPSPEED""", """MULTI_XPU""", """FSDP"""]









def       SCREAMING_SNAKE_CASE__  (       _lowercase     : str			)   ->							str:




		'''simple docstring'''
		if not all(char in '01' for char in bin_string			):
				raise ValueError('Non-binary value was passed to the function'			)
		if not bin_string:
				raise ValueError('Empty string was passed to the function'			)
		lowercase__					:      Tuple      =		''
		while len(_lowercase			) % 3 != 0:
				lowercase__					:      Optional[int]      =		'0' + bin_string
		lowercase__					:      List[Any]      =		[
		    bin_string[index : index + 3]
		    for index in range(len(_lowercase			)			)
		    if index % 3 == 0
		]
		for bin_group in bin_string_in_3_list:
				lowercase__					:      int      =		0
				for index, val in enumerate(_lowercase			):
						oct_val += int(2 ** (2 - index) * int(_lowercase			)			)
				oct_string += str(_lowercase			)
		return oct_string


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

			testmod()


