


'''simple docstring'''







import argparse

from ...utils.dataclasses import (
    ComputeEnvironment,
    DistributedType,
    DynamoBackend,
    PrecisionType,
    SageMakerDistributedType,
)
from ..menu import BulletMenu


lowerCAmelCase    :     int					=						[
    """EAGER""",
    """AOT_EAGER""",
    """INDUCTOR""",
    """NVFUSER""",
    """AOT_NVFUSER""",
    """AOT_CUDAGRAPHS""",
    """OFI""",
    """FX2TRT""",
    """ONNXRT""",
    """IPEX""",
]





def 			lowercase				(_A   ,						_A=None   ,						_A=None   ,						_A=None					):







       """simple docstring"""







       _lowerCAmelCase    :							Optional[Any]   			=       True
       while ask_again:
              _lowerCAmelCase    :							Dict   			=       input(_A					)
              try:
                     if default is not None and len(_A					) == 0:
                            return default
                     return convert_value(_A					) if convert_value is not None else result
              except Exception:
                     if error_message is not None:
                            print(_A					)





def 			lowercase				(_A   ,						_A=[]   ,						_A=None   ,						_A=0					):







       """simple docstring"""







       _lowerCAmelCase    :							Dict   			=       BulletMenu(_A   ,						_A					)
       _lowerCAmelCase    :							Optional[int]   			=       menu.run(default_choice=_A					)
       return convert_value(_A					) if convert_value is not None else result





def 			lowercase				(_A					):







       """simple docstring"""







       _lowerCAmelCase    :							Optional[int]   			=       int(_A					)
       return ComputeEnvironment(['LOCAL_MACHINE', 'AMAZON_SAGEMAKER'][value]					)





def 			lowercase				(_A					):







       """simple docstring"""







       _lowerCAmelCase    :							str   			=       int(_A					)
       return DistributedType(['NO', 'MULTI_CPU', 'MULTI_XPU', 'MULTI_GPU', 'MULTI_NPU', 'TPU'][value]					)





def 			lowercase				(_A					):







       """simple docstring"""







       _lowerCAmelCase    :							Optional[int]   			=       int(_A					)
       return DynamoBackend(DYNAMO_BACKENDS[value]					).value





def 			lowercase				(_A					):







       """simple docstring"""







       _lowerCAmelCase    :							Optional[int]   			=       int(_A					)
       return PrecisionType(['no', 'fp16', 'bf16', 'fp8'][value]					)





def 			lowercase				(_A					):







       """simple docstring"""







       _lowerCAmelCase    :							Union[str, Any]   			=       int(_A					)
       return SageMakerDistributedType(['NO', 'DATA_PARALLEL', 'MODEL_PARALLEL'][value]					)





def 			lowercase				(_A					):







       """simple docstring"""







       return {"yes": True, "no": False}[value.lower()]
class 	UpperCamelCase__					( argparse.RawDescriptionHelpFormatter	):



     """simple docstring"""






     def a	( self      ,	snake_case__      ,	snake_case__      ,	snake_case__      ,	snake_case__   ):

            '''simple docstring'''

            _lowerCAmelCase    :							List[str]   			=       super()._format_usage(snake_case__      ,	snake_case__      ,	snake_case__      ,	snake_case__   )
            _lowerCAmelCase    :							int   			=       usage.replace('<command> [<args>] '      ,	''   )
            return usage





'''simple docstring'''







from .configuration_bert_masked import MaskedBertConfig
from .modeling_bert_masked import (
    MaskedBertForMultipleChoice,
    MaskedBertForQuestionAnswering,
    MaskedBertForSequenceClassification,
    MaskedBertForTokenClassification,
    MaskedBertModel,
)
from .modules import *

