"""simple docstring"""





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


_UpperCamelCase       :						Optional[Any]     =   {
    "configuration_markuplm": ["MARKUPLM_PRETRAINED_CONFIG_ARCHIVE_MAP", "MarkupLMConfig"],
    "feature_extraction_markuplm": ["MarkupLMFeatureExtractor"],
    "processing_markuplm": ["MarkupLMProcessor"],
    "tokenization_markuplm": ["MarkupLMTokenizer"],
}

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

try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       _UpperCamelCase       :						int     =   [
           "MARKUPLM_PRETRAINED_MODEL_ARCHIVE_LIST",
           "MarkupLMForQuestionAnswering",
           "MarkupLMForSequenceClassification",
           "MarkupLMForTokenClassification",
           "MarkupLMModel",
           "MarkupLMPreTrainedModel",
       ]


if TYPE_CHECKING:
       from .configuration_markuplm import MARKUPLM_PRETRAINED_CONFIG_ARCHIVE_MAP, MarkupLMConfig
       from .feature_extraction_markuplm import MarkupLMFeatureExtractor
       from .processing_markuplm import MarkupLMProcessor
       from .tokenization_markuplm import MarkupLMTokenizer

       try:
              if not is_tokenizers_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .tokenization_markuplm_fast import MarkupLMTokenizerFast

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_markuplm import (
                  MARKUPLM_PRETRAINED_MODEL_ARCHIVE_LIST,
                  MarkupLMForQuestionAnswering,
                  MarkupLMForSequenceClassification,
                  MarkupLMForTokenClassification,
                  MarkupLMModel,
                  MarkupLMPreTrainedModel,
              )


else:
       import sys

       _UpperCamelCase       :						Optional[Any]     =   _LazyModule(__name__, globals()["__file__"], _import_structure)


"""simple docstring"""





import torch

from transformers import PreTrainedModel

from .custom_configuration import CustomConfig, NoSuperInitConfig


class 					UpperCAmelCase_     (   _a):
      lowerCamelCase__		:   List[str]			  =  CustomConfig


      def __init__(       self		,      a							)	-> Optional[int]:
             super().__init__(a							)
             lowercase__      :		Any          =     torch.nn.Linear(config.hidden_size		,      config.hidden_size							)


      def 		_UpperCAmelCase	(       self		,      a							)	-> Union[str, Any]:
             return self.linear(a							)


      def 		_UpperCAmelCase	(       self		,      a							)	-> Tuple:
             pass





class 					UpperCAmelCase_     (   _a):
      lowerCamelCase__		:   Optional[int]			  =  NoSuperInitConfig


      def __init__(       self		,      a							)	-> int:
             super().__init__(a							)
             lowercase__      :		List[Any]          =     torch.nn.Linear(config.attribute		,      config.attribute							)


      def 		_UpperCAmelCase	(       self		,      a							)	-> Optional[int]:
             return self.linear(a							)


      def 		_UpperCAmelCase	(       self		,      a							)	-> Optional[Any]:
             pass

