

"""simple docstring"""




import operator as op


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

_lowercase   :	List[Any]												=						{'>': op.gt, '>=': op.ge, '==': op.eq, '!=': op.ne, '<=': op.le, '<': op.lt}

# These are the args for `torch.distributed.launch` for pytorch < 1.9
_lowercase   :	Dict												=						[
    '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',
]

_lowercase   :	int												=						['DEEPSPEED', 'MULTI_GPU', 'FSDP', 'MEGATRON_LM']
_lowercase   :	str												=						['DEEPSPEED', 'MULTI_XPU', 'FSDP']








'''simple docstring'''

from __future__ import annotations

from collections import namedtuple



def 				snake_case       (  a_				:			float     , a_				:			float     , a_				:			float						)							->					tuple:





      """simple docstring"""

      UpperCamelCase_					: Tuple            =				namedtuple("""result"""     , """name value"""						)
      if (voltage, current, power).count(0						) != 1:
            raise ValueError("""Only one argument must be 0"""						)
      elif power < 0:
            raise ValueError(
                """Power cannot be negative in any electrical/electronics system"""						)
      elif voltage == 0:
            return result("""voltage"""     , power / current						)
      elif current == 0:
            return result("""current"""     , power / voltage						)
      elif power == 0:
            return result("""power"""     , float(round(abs(voltage * current						)     , 2						)						)						)
      else:
            raise ValueError("""Exactly one argument must be 0"""						)


if __name__ == "__main__":
      import doctest

      doctest.testmod()






