





import pytest
import requests

from datasets.utils.file_utils import http_head

from .utils import OfflineSimulationMode, RequestWouldHangIndefinitelyError, offline





@pytest.mark.integration
def        _lowercase   (  )  ->					str:
				with offline(OfflineSimulationMode.CONNECTION_TIMES_OUT			):
								with pytest.raises(_UpperCAmelCase			):
												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        _lowercase   (  )  ->					Union[str, Any]:
				with offline(OfflineSimulationMode.CONNECTION_FAILS			):
								with pytest.raises(requests.exceptions.ConnectionError			):
												requests.request("""GET"""     , """https://huggingface.co"""			)





def        _lowercase   (  )  ->					int:
				with offline(OfflineSimulationMode.HF_DATASETS_OFFLINE_SET_TO_1			):
								with pytest.raises(_UpperCAmelCase			):
												http_head("""https://huggingface.co"""			)









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


UpperCAmelCase__  :     Union[str, Any]   			=logging.get_logger(__name__)

UpperCAmelCase__  :     Any   			={
    '''sayakpaul/vit-msn-base''': '''https://huggingface.co/sayakpaul/vit-msn-base/resolve/main/config.json''',
    # See all ViT MSN models at https://huggingface.co/models?filter=vit_msn
}

class  __A       (  a      ):
				__A								=			"""vit_msn"""


				def __init__(						self				,	UpperCAmelCase_=768				,	UpperCAmelCase_=12				,	UpperCAmelCase_=12				,	UpperCAmelCase_=3072				,	UpperCAmelCase_="gelu"				,	UpperCAmelCase_=0.0				,	UpperCAmelCase_=0.0				,	UpperCAmelCase_=0.0_2				,	UpperCAmelCase_=1E-06				,	UpperCAmelCase_=224				,	UpperCAmelCase_=16				,	UpperCAmelCase_=3				,	UpperCAmelCase_=True				,	**UpperCAmelCase_				,	):
								super().__init__(**UpperCAmelCase_							)

								lowerCamelCase			=hidden_size
								lowerCamelCase			=num_hidden_layers
								lowerCamelCase			=num_attention_heads
								lowerCamelCase			=intermediate_size
								lowerCamelCase			=hidden_act
								lowerCamelCase			=hidden_dropout_prob
								lowerCamelCase			=attention_probs_dropout_prob
								lowerCamelCase			=initializer_range
								lowerCamelCase			=layer_norm_eps
								lowerCamelCase			=image_size
								lowerCamelCase			=patch_size
								lowerCamelCase			=num_channels
								lowerCamelCase			=qkv_bias





