

import operator as op


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

_lowerCamelCase    :       Union[str, 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
_lowerCamelCase    :       Union[str, 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",
]

_lowerCamelCase    :       List[Any]        =							["DEEPSPEED", "MULTI_GPU", "FSDP", "MEGATRON_LM"]
_lowerCamelCase    :       str        =							["DEEPSPEED", "MULTI_XPU", "FSDP"]








from math import log

from scipy.constants import Boltzmann, physical_constants

_lowerCamelCase    :       Tuple        =							3_0_0  # TEMPERATURE (unit = K)

def       a__					(		UpperCAmelCase							:      float    ,			UpperCAmelCase							:      float    ,			UpperCAmelCase							:      float    ,			)  ->						float:

  if donor_conc <= 0:
    raise ValueError('''Donor concentration should be positive'''      )
  elif acceptor_conc <= 0:
    raise ValueError('''Acceptor concentration should be positive'''      )
  elif intrinsic_conc <= 0:
    raise ValueError('''Intrinsic concentration should be positive'''      )
  elif donor_conc <= intrinsic_conc:
    raise ValueError(
        '''Donor concentration should be greater than intrinsic concentration'''      )
  elif acceptor_conc <= intrinsic_conc:
    raise ValueError(
        '''Acceptor concentration should be greater than intrinsic concentration'''      )
  else:
    return (
        Boltzmann
        * T
        * log((donor_conc * acceptor_conc) / intrinsic_conc**2      )
        / physical_constants["electron volt"][0]
    )


if __name__ == "__main__":
     import doctest

     doctest.testmod()





