






"""simple docstring"""







import os
import sys

_UpperCamelCase					      =  os.path.join(os.path.dirname(__file__), """src""")
sys.path.append(SRC_DIR)


from transformers import (
    AutoConfig,
    AutoModel,
    AutoModelForCausalLM,
    AutoModelForMaskedLM,
    AutoModelForQuestionAnswering,
    AutoModelForSequenceClassification,
    AutoTokenizer,
    add_start_docstrings,
)


_UpperCamelCase					      =  [
    """torch""",
    """numpy""",
    """tokenizers""",
    """filelock""",
    """requests""",
    """tqdm""",
    """regex""",
    """sentencepiece""",
    """sacremoses""",
    """importlib_metadata""",
    """huggingface_hub""",
]

@add_start_docstrings(AutoConfig.__doc__							)
def _a			(		*_snake_case				,	**_snake_case							):







      """simple docstring"""






      return AutoConfig.from_pretrained(*_snake_case				,	**_snake_case							)

@add_start_docstrings(AutoTokenizer.__doc__							)
def _a			(		*_snake_case				,	**_snake_case							):







      """simple docstring"""






      return AutoTokenizer.from_pretrained(*_snake_case				,	**_snake_case							)

@add_start_docstrings(AutoModel.__doc__							)
def _a			(		*_snake_case				,	**_snake_case							):







      """simple docstring"""






      return AutoModel.from_pretrained(*_snake_case				,	**_snake_case							)

@add_start_docstrings(AutoModelForCausalLM.__doc__							)
def _a			(		*_snake_case				,	**_snake_case							):







      """simple docstring"""






      return AutoModelForCausalLM.from_pretrained(*_snake_case				,	**_snake_case							)

@add_start_docstrings(AutoModelForMaskedLM.__doc__							)
def _a			(		*_snake_case				,	**_snake_case							):







      """simple docstring"""






      return AutoModelForMaskedLM.from_pretrained(*_snake_case				,	**_snake_case							)

@add_start_docstrings(AutoModelForSequenceClassification.__doc__							)
def _a			(		*_snake_case				,	**_snake_case							):







      """simple docstring"""






      return AutoModelForSequenceClassification.from_pretrained(*_snake_case				,	**_snake_case							)






@add_start_docstrings(AutoModelForQuestionAnswering.__doc__							)
def _a			(		*_snake_case				,	**_snake_case							):







      """simple docstring"""






      return AutoModelForQuestionAnswering.from_pretrained(*_snake_case				,	**_snake_case							)











"""simple docstring"""







from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_sentencepiece_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


_UpperCamelCase					      =  {"""configuration_mbart""": ["""MBART_PRETRAINED_CONFIG_ARCHIVE_MAP""", """MBartConfig""", """MBartOnnxConfig"""]}

try:
  if not is_sentencepiece_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  _UpperCamelCase					      =  ["""MBartTokenizer"""]

try:
  if not is_tokenizers_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  _UpperCamelCase					      =  ["""MBartTokenizerFast"""]

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  _UpperCamelCase					      =  [
      """MBART_PRETRAINED_MODEL_ARCHIVE_LIST""",
      """MBartForCausalLM""",
      """MBartForConditionalGeneration""",
      """MBartForQuestionAnswering""",
      """MBartForSequenceClassification""",
      """MBartModel""",
      """MBartPreTrainedModel""",
  ]

try:
  if not is_tf_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  _UpperCamelCase					      =  [
      """TFMBartForConditionalGeneration""",
      """TFMBartModel""",
      """TFMBartPreTrainedModel""",
  ]

try:
  if not is_flax_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  _UpperCamelCase					      =  [
      """FlaxMBartForConditionalGeneration""",
      """FlaxMBartForQuestionAnswering""",
      """FlaxMBartForSequenceClassification""",
      """FlaxMBartModel""",
      """FlaxMBartPreTrainedModel""",
  ]


if TYPE_CHECKING:
  from .configuration_mbart import MBART_PRETRAINED_CONFIG_ARCHIVE_MAP, MBartConfig, MBartOnnxConfig

  try:
    if not is_sentencepiece_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .tokenization_mbart import MBartTokenizer

  try:
    if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .tokenization_mbart_fast import MBartTokenizerFast

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_mbart import (
        MBART_PRETRAINED_MODEL_ARCHIVE_LIST,
        MBartForCausalLM,
        MBartForConditionalGeneration,
        MBartForQuestionAnswering,
        MBartForSequenceClassification,
        MBartModel,
        MBartPreTrainedModel,
    )

  try:
    if not is_tf_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_tf_mbart import TFMBartForConditionalGeneration, TFMBartModel, TFMBartPreTrainedModel

  try:
    if not is_flax_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_flax_mbart import (
        FlaxMBartForConditionalGeneration,
        FlaxMBartForQuestionAnswering,
        FlaxMBartForSequenceClassification,
        FlaxMBartModel,
        FlaxMBartPreTrainedModel,
    )

else:
  import sys

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



