



"""simple docstring"""







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


__snake_case						:					int	       =      logging.get_logger(__name__)

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

class    UpperCamelCase	(       __SCREAMING_SNAKE_CASE					):





     """simple docstring"""






     _lowerCamelCase       :			List[str]					 ="""mgp-str"""





     def __init__(       self			:				List[Any]						,   _lowerCamelCase			:				Optional[int]=[3_2, 1_2_8]						,   _lowerCamelCase			:				Any=4						,   _lowerCamelCase			:				int=3						,   _lowerCamelCase			:				Union[str, Any]=2_7						,   _lowerCamelCase			:				Tuple=3_8						,   _lowerCamelCase			:				Optional[Any]=5_0_2_5_7						,   _lowerCamelCase			:				List[str]=3_0_5_2_2						,   _lowerCamelCase			:				List[str]=7_6_8						,   _lowerCamelCase			:				Optional[int]=1_2						,   _lowerCamelCase			:				Union[str, Any]=1_2						,   _lowerCamelCase			:				int=4.0						,   _lowerCamelCase			:				Dict=True						,   _lowerCamelCase			:				Tuple=False						,   _lowerCamelCase			:				List[str]=1E-5						,   _lowerCamelCase			:				Any=0.0						,   _lowerCamelCase			:				Dict=0.0						,   _lowerCamelCase			:				Tuple=0.0						,   _lowerCamelCase			:				Tuple=False						,   _lowerCamelCase			:				Optional[Any]=0.02						,   **_lowerCamelCase			:				Dict						,   ):
          super().__init__(**A_			)

          A__      						= image_size
          A__      						= patch_size
          A__      						= num_channels
          A__      						= max_token_length
          A__      						= num_character_labels
          A__      						= num_bpe_labels
          A__      						= num_wordpiece_labels
          A__      						= hidden_size
          A__      						= num_hidden_layers
          A__      						= num_attention_heads
          A__      						= mlp_ratio
          A__      						= distilled
          A__      						= layer_norm_eps
          A__      						= drop_rate
          A__      						= qkv_bias
          A__      						= attn_drop_rate
          A__      						= drop_path_rate
          A__      						= output_aa_attentions
          A__      						= initializer_range










import pytest
import requests

from datasets.utils.file_utils import http_head

from .utils import OfflineSimulationMode, RequestWouldHangIndefinitelyError, offline


@pytest.mark.integration
def 							__snake_case							(    )				->						Any:
    with offline(OfflineSimulationMode.CONNECTION_TIMES_OUT	):
        with pytest.raises(lowerCAmelCase_	):
            requests.request('''GET''' ,							'''https://huggingface.co'''	)
        with pytest.raises(requests.exceptions.ConnectTimeout	):
            requests.request('''GET''' ,							'''https://huggingface.co''' ,							timeout=1.0	)


@pytest.mark.integration
def 							__snake_case							(    )				->						int:
    with offline(OfflineSimulationMode.CONNECTION_FAILS	):
        with pytest.raises(requests.exceptions.ConnectionError	):
            requests.request('''GET''' ,							'''https://huggingface.co'''	)



def 							__snake_case							(    )				->						List[Any]:
    with offline(OfflineSimulationMode.HF_DATASETS_OFFLINE_SET_TO_1	):
        with pytest.raises(lowerCAmelCase_	):
            http_head('''https://huggingface.co'''	)
