
"""simple docstring"""







import operator as op


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

lowerCamelCase__           =	{""">""": 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__           =	[
    """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__           =	["""DEEPSPEED""", """MULTI_GPU""", """FSDP""", """MEGATRON_LM"""]
lowerCamelCase__           =	["""DEEPSPEED""", """MULTI_XPU""", """FSDP"""]

"""simple docstring"""







from .testing import (
    are_the_same_tensors,
    execute_subprocess_async,
    require_bnb,
    require_cpu,
    require_cuda,
    require_huggingface_suite,
    require_mps,
    require_multi_gpu,
    require_multi_xpu,
    require_safetensors,
    require_single_gpu,
    require_single_xpu,
    require_torch_min_version,
    require_tpu,
    require_xpu,
    skip,
    slow,
)
from .training import RegressionDataset, RegressionModel, RegressionModelaXPU


from .scripts import test_script, test_sync, test_ops  # isort: skip