




'''simple docstring'''



import operator as op


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

__UpperCAmelCase    :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
__UpperCAmelCase    :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",
]

__UpperCAmelCase    :List[Any]				       =     ["DEEPSPEED", "MULTI_GPU", "FSDP", "MEGATRON_LM"]
__UpperCAmelCase    :Tuple				       =     ["DEEPSPEED", "MULTI_XPU", "FSDP"]



'''simple docstring'''



from __future__ import annotations




def 			_a			(		_lowercase      :			list						):





     '''simple docstring'''






     if not nums:
          raise ValueError('''List is empty'''						)
     return sum(_lowercase						) / len(_lowercase						)


if __name__ == "__main__":
      import doctest

      doctest.testmod()