





from ...configuration_utils import PretrainedConfig
from ...utils import logging


_UpperCamelCase				=       logging.get_logger(__name__)

_UpperCamelCase				=       {
    'microsoft/markuplm-base': 'https://huggingface.co/microsoft/markuplm-base/resolve/main/config.json',
    'microsoft/markuplm-large': 'https://huggingface.co/microsoft/markuplm-large/resolve/main/config.json',
}




class  _lowerCamelCase       (			lowercase__			):



      """simple docstring"""






      UpperCAmelCase_  :					str      			='''markuplm'''







      def __init__(       self ,  UpperCAmelCase=30522 ,  UpperCAmelCase=768 ,  UpperCAmelCase=12 ,  UpperCAmelCase=12 ,  UpperCAmelCase=3072 ,  UpperCAmelCase="gelu" ,  UpperCAmelCase=0.1 ,  UpperCAmelCase=0.1 ,  UpperCAmelCase=512 ,  UpperCAmelCase=2 ,  UpperCAmelCase=0.02 ,  UpperCAmelCase=1E-12 ,  UpperCAmelCase=0 ,  UpperCAmelCase=0 ,  UpperCAmelCase=2 ,  UpperCAmelCase=256 ,  UpperCAmelCase=1024 ,  UpperCAmelCase=216 ,  UpperCAmelCase=1001 ,  UpperCAmelCase=32 ,  UpperCAmelCase=50 ,  UpperCAmelCase="absolute" ,  UpperCAmelCase=True ,  UpperCAmelCase=None ,  **UpperCAmelCase ,  )				->      Optional[Any]:






        '''simple docstring'''






        super().__init__(
            pad_token_id=SCREAMING_SNAKE_CASE__ ,  bos_token_id=SCREAMING_SNAKE_CASE__ ,  eos_token_id=SCREAMING_SNAKE_CASE__ ,  **SCREAMING_SNAKE_CASE__ ,  )
        __snake_case      : List[Any]						=				vocab_size
        __snake_case      : List[Any]						=				hidden_size
        __snake_case      : List[str]						=				num_hidden_layers
        __snake_case      : Dict						=				num_attention_heads
        __snake_case      : Tuple						=				hidden_act
        __snake_case      : Dict						=				intermediate_size
        __snake_case      : Dict						=				hidden_dropout_prob
        __snake_case      : Optional[Any]						=				attention_probs_dropout_prob
        __snake_case      : Any						=				max_position_embeddings
        __snake_case      : Union[str, Any]						=				type_vocab_size
        __snake_case      : int						=				initializer_range
        __snake_case      : Dict						=				layer_norm_eps
        __snake_case      : int						=				position_embedding_type
        __snake_case      : Optional[Any]						=				use_cache
        __snake_case      : Optional[int]						=				classifier_dropout
        # additional properties
        __snake_case      : Tuple						=				max_depth
        __snake_case      : Union[str, Any]						=				max_xpath_tag_unit_embeddings
        __snake_case      : List[Any]						=				max_xpath_subs_unit_embeddings
        __snake_case      : str						=				tag_pad_id
        __snake_case      : Optional[int]						=				subs_pad_id
        __snake_case      : Optional[int]						=				xpath_unit_hidden_size





import inspect
import re
from hashlib import shaaaa
from typing import Dict, List

from .arrow import arrow
from .audiofolder import audiofolder
from .csv import csv
from .imagefolder import imagefolder
from .json import json
from .pandas import pandas
from .parquet import parquet
from .sql import sql  # noqa F401
from .text import text







def        SCREAMING_SNAKE_CASE_						(			__A :			List[str]				)	->		str:

       """simple docstring"""

       a_					:		Tuple							=  []
       for line in lines:
              a_					:		Any							=  re.sub(R'#.*'  ,    ''  ,    __A				)  # remove comments
              if line:
                     filtered_lines.append(__A				)
       a_					:		Tuple							=  '\n'.join(__A				)

       # Make a hash from all this code
       a_					:		Tuple							=  full_str.encode('utf-8'				)
       return shaaaa(__A				).hexdigest()


# get importable module names and hash for caching
UpperCAmelCase_      : List[Any]  					=       {
    'csv': (csv.__name__, _hash_python_lines(inspect.getsource(csv).splitlines())),
    'json': (json.__name__, _hash_python_lines(inspect.getsource(json).splitlines())),
    'pandas': (pandas.__name__, _hash_python_lines(inspect.getsource(pandas).splitlines())),
    'parquet': (parquet.__name__, _hash_python_lines(inspect.getsource(parquet).splitlines())),
    'arrow': (arrow.__name__, _hash_python_lines(inspect.getsource(arrow).splitlines())),
    'text': (text.__name__, _hash_python_lines(inspect.getsource(text).splitlines())),
    'imagefolder': (imagefolder.__name__, _hash_python_lines(inspect.getsource(imagefolder).splitlines())),
    'audiofolder': (audiofolder.__name__, _hash_python_lines(inspect.getsource(audiofolder).splitlines())),
}

# Used to infer the module to use based on the data files extensions
UpperCAmelCase_      : Dict  					=       {
    '.csv': ('csv', {}),
    '.tsv': ('csv', {'sep': '\t'}),
    '.json': ('json', {}),
    '.jsonl': ('json', {}),
    '.parquet': ('parquet', {}),
    '.arrow': ('arrow', {}),
    '.txt': ('text', {}),
}
_EXTENSION_TO_MODULE.update({ext: ('imagefolder', {}) for ext in imagefolder.ImageFolder.EXTENSIONS})
_EXTENSION_TO_MODULE.update({ext.upper(): ('imagefolder', {}) for ext in imagefolder.ImageFolder.EXTENSIONS})
_EXTENSION_TO_MODULE.update({ext: ('audiofolder', {}) for ext in audiofolder.AudioFolder.EXTENSIONS})
_EXTENSION_TO_MODULE.update({ext.upper(): ('audiofolder', {}) for ext in audiofolder.AudioFolder.EXTENSIONS})
UpperCAmelCase_      : Optional[int]  					=       {'imagefolder', 'audiofolder'}

# Used to filter data files based on extensions given a module name
UpperCAmelCase_      : Dict[str, List[str]]  					=       {}
for _ext, (_module, _) in _EXTENSION_TO_MODULE.items():
   _MODULE_TO_EXTENSIONS.setdefault(_module, []).append(_ext)

_MODULE_TO_EXTENSIONS["imagefolder"].append('.zip')
_MODULE_TO_EXTENSIONS["audiofolder"].append('.zip')


