"""simple docstring"""







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


__SCREAMING_SNAKE_CASE    	=logging.get_logger(__name__)

__SCREAMING_SNAKE_CASE    	={
    "alibaba-damo/mgp-str-base": "https://huggingface.co/alibaba-damo/mgp-str-base/resolve/main/config.json",
}







class        UpperCamelCase		(			lowercase_  ):
   lowercase							=  'mgp-str'
   def __init__(			self     ,__UpperCamelCase=[32, 128]     ,__UpperCamelCase=4     ,__UpperCamelCase=3     ,__UpperCamelCase=27     ,__UpperCamelCase=38     ,__UpperCamelCase=5_0257     ,__UpperCamelCase=3_0522     ,__UpperCamelCase=768     ,__UpperCamelCase=12     ,__UpperCamelCase=12     ,__UpperCamelCase=4.0     ,__UpperCamelCase=True     ,__UpperCamelCase=False     ,__UpperCamelCase=1e-5     ,__UpperCamelCase=0.0     ,__UpperCamelCase=0.0     ,__UpperCamelCase=0.0     ,__UpperCamelCase=False     ,__UpperCamelCase=0.02     ,**__UpperCamelCase     ,)	->      Any:


        '''simple docstring'''


        super().__init__(**__UpperCamelCase			)

        lowercase_	:				Optional[Any]													=	image_size
        lowercase_	:				Optional[int]													=	patch_size
        lowercase_	:				Dict													=	num_channels
        lowercase_	:				List[str]													=	max_token_length
        lowercase_	:				Tuple													=	num_character_labels
        lowercase_	:				Tuple													=	num_bpe_labels
        lowercase_	:				str													=	num_wordpiece_labels
        lowercase_	:				Optional[int]													=	hidden_size
        lowercase_	:				List[Any]													=	num_hidden_layers
        lowercase_	:				Optional[int]													=	num_attention_heads
        lowercase_	:				Union[str, Any]													=	mlp_ratio
        lowercase_	:				Optional[Any]													=	distilled
        lowercase_	:				int													=	layer_norm_eps
        lowercase_	:				Optional[int]													=	drop_rate
        lowercase_	:				Any													=	qkv_bias
        lowercase_	:				List[str]													=	attn_drop_rate
        lowercase_	:				List[str]													=	drop_path_rate
        lowercase_	:				Union[str, Any]													=	output_aa_attentions
        lowercase_	:				Union[str, Any]													=	initializer_range


"""simple docstring"""







import sys

from .dependency_versions_table import deps
from .utils.versions import require_version, require_version_core


# define which module versions we always want to check at run time
# (usually the ones defined in `install_requires` in setup.py)
#
# order specific notes:
# - tqdm must be checked before tokenizers

__SCREAMING_SNAKE_CASE    	="python tqdm regex requests packaging filelock numpy tokenizers".split()
if sys.version_info < (3, 7):
       pkgs_to_check_at_runtime.append("dataclasses")
if sys.version_info < (3, 8):
       pkgs_to_check_at_runtime.append("importlib_metadata")

for pkg in pkgs_to_check_at_runtime:
       if pkg in deps:
              if pkg == "tokenizers":
                     # must be loaded here, or else tqdm check may fail
                     from .utils import is_tokenizers_available

                     if not is_tokenizers_available():
                            continue  # not required, check version only if installed

              require_version_core(deps[pkg])
       else:
              raise ValueError(F"can't find {pkg} in {deps.keys()}, check dependency_versions_table.py")



def 			lowercase__(       __SCREAMING_SNAKE_CASE							:     int     ,			__SCREAMING_SNAKE_CASE							:     Union[str, Any]=None      ):
     require_version(deps[pkg]     ,			__SCREAMING_SNAKE_CASE      )

