





from argparse import ArgumentParser

from accelerate.commands.config import get_config_parser
from accelerate.commands.env import env_command_parser
from accelerate.commands.launch import launch_command_parser
from accelerate.commands.test import test_command_parser
from accelerate.commands.tpu import tpu_command_parser



def        __lowercase       (				)			->       List[Any]:


						'''simple docstring'''


						SCREAMING_SNAKE_CASE		=						ArgumentParser("""Accelerate CLI tool"""			,						usage="""accelerate <command> [<args>]"""			,						allow_abbrev=_SCREAMING_SNAKE_CASE     )
						SCREAMING_SNAKE_CASE		=						parser.add_subparsers(help="""accelerate command helpers"""     )

						# Register commands
						get_config_parser(subparsers=_SCREAMING_SNAKE_CASE     )
						env_command_parser(subparsers=_SCREAMING_SNAKE_CASE     )
						launch_command_parser(subparsers=_SCREAMING_SNAKE_CASE     )
						tpu_command_parser(subparsers=_SCREAMING_SNAKE_CASE     )
						test_command_parser(subparsers=_SCREAMING_SNAKE_CASE     )

						# Let's go
						SCREAMING_SNAKE_CASE		=						parser.parse_args()

						if not hasattr(_SCREAMING_SNAKE_CASE			,						"""func"""     ):
												parser.print_help()
												exit(1     )

						# Run
						args.func(_SCREAMING_SNAKE_CASE     )


if __name__ == "__main__":
						main()









from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


SCREAMING_SNAKE_CASE_						       =	{
    """configuration_megatron_bert""": ["""MEGATRON_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """MegatronBertConfig"""],
}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      SCREAMING_SNAKE_CASE_						       =	[
          """MEGATRON_BERT_PRETRAINED_MODEL_ARCHIVE_LIST""",
          """MegatronBertForCausalLM""",
          """MegatronBertForMaskedLM""",
          """MegatronBertForMultipleChoice""",
          """MegatronBertForNextSentencePrediction""",
          """MegatronBertForPreTraining""",
          """MegatronBertForQuestionAnswering""",
          """MegatronBertForSequenceClassification""",
          """MegatronBertForTokenClassification""",
          """MegatronBertModel""",
          """MegatronBertPreTrainedModel""",
      ]

if TYPE_CHECKING:
      from .configuration_megatron_bert import MEGATRON_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP, MegatronBertConfig

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_megatron_bert import (
                MEGATRON_BERT_PRETRAINED_MODEL_ARCHIVE_LIST,
                MegatronBertForCausalLM,
                MegatronBertForMaskedLM,
                MegatronBertForMultipleChoice,
                MegatronBertForNextSentencePrediction,
                MegatronBertForPreTraining,
                MegatronBertForQuestionAnswering,
                MegatronBertForSequenceClassification,
                MegatronBertForTokenClassification,
                MegatronBertModel,
                MegatronBertPreTrainedModel,
            )

else:
      import sys

      SCREAMING_SNAKE_CASE_						       =	_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)


