






from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


SCREAMING_SNAKE_CASE__   :      Any				=		logging.get_logger(__name__)

SCREAMING_SNAKE_CASE__   :      Optional[Any]				=		{
    """google/bigbird-roberta-base""": """https://huggingface.co/google/bigbird-roberta-base/resolve/main/config.json""",
    """google/bigbird-roberta-large""": """https://huggingface.co/google/bigbird-roberta-large/resolve/main/config.json""",
    """google/bigbird-base-trivia-itc""": """https://huggingface.co/google/bigbird-base-trivia-itc/resolve/main/config.json""",
    # See all BigBird models at https://huggingface.co/models?filter=big_bird
}
class     lowerCamelCase_					(   lowerCamelCase			):
				a__       							=	'''big_bird'''







				def __init__(    self							,       __lowerCAmelCase=5_0_3_5_8							,       __lowerCAmelCase=7_6_8							,       __lowerCAmelCase=1_2							,       __lowerCAmelCase=1_2							,       __lowerCAmelCase=3_0_7_2							,       __lowerCAmelCase="gelu_new"							,       __lowerCAmelCase=0.1							,       __lowerCAmelCase=0.1							,       __lowerCAmelCase=4_0_9_6							,       __lowerCAmelCase=2							,       __lowerCAmelCase=0.02							,       __lowerCAmelCase=1E-12							,       __lowerCAmelCase=True							,       __lowerCAmelCase=0							,       __lowerCAmelCase=1							,       __lowerCAmelCase=2							,       __lowerCAmelCase=6_6							,       __lowerCAmelCase="block_sparse"							,       __lowerCAmelCase=True							,       __lowerCAmelCase=False							,       __lowerCAmelCase=6_4							,       __lowerCAmelCase=3							,       __lowerCAmelCase=None							,       **__lowerCAmelCase							,       ):
								"""simple docstring"""
								super().__init__(
								    pad_token_id=__lowerCAmelCase							,       bos_token_id=__lowerCAmelCase							,       eos_token_id=__lowerCAmelCase							,       sep_token_id=__lowerCAmelCase							,       **__lowerCAmelCase							,       )

								__magic_name__		:Union[str, Any]   =   vocab_size
								__magic_name__		:List[str]   =   max_position_embeddings
								__magic_name__		:Dict   =   hidden_size
								__magic_name__		:Union[str, Any]   =   num_hidden_layers
								__magic_name__		:str   =   num_attention_heads
								__magic_name__		:Any   =   intermediate_size
								__magic_name__		:List[Any]   =   hidden_act
								__magic_name__		:Any   =   hidden_dropout_prob
								__magic_name__		:str   =   attention_probs_dropout_prob
								__magic_name__		:Union[str, Any]   =   initializer_range
								__magic_name__		:Optional[int]   =   type_vocab_size
								__magic_name__		:Optional[Any]   =   layer_norm_eps
								__magic_name__		:List[str]   =   use_cache

								__magic_name__		:Optional[Any]   =   rescale_embeddings
								__magic_name__		:Optional[Any]   =   attention_type
								__magic_name__		:Optional[Any]   =   use_bias
								__magic_name__		:Optional[int]   =   block_size
								__magic_name__		:List[Any]   =   num_random_blocks
								__magic_name__		:List[str]   =   classifier_dropout







class     lowerCamelCase_					(   lowerCamelCase			):







				@property
				def       A						(    self  ):
								"""simple docstring"""
								if self.task == "multiple-choice":
												__magic_name__		:int   =   {0: '''batch''', 1: '''choice''', 2: '''sequence'''}
								else:
												__magic_name__		:Dict   =   {0: '''batch''', 1: '''sequence'''}
								return OrderedDict(
								    [
								        ('''input_ids''', dynamic_axis),
								        ('''attention_mask''', dynamic_axis),
								    ]  )














import pytest
import requests

from datasets.utils.file_utils import http_head

from .utils import OfflineSimulationMode, RequestWouldHangIndefinitelyError, offline

@pytest.mark.integration
def   __lowercase       (			):







				"""simple docstring"""






				with offline(OfflineSimulationMode.CONNECTION_TIMES_OUT			):
								with pytest.raises(snake_case			):
												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       (			):







				"""simple docstring"""






				with offline(OfflineSimulationMode.CONNECTION_FAILS			):
								with pytest.raises(requests.exceptions.ConnectionError			):
												requests.request('''GET''',	'''https://huggingface.co'''			)

def   __lowercase       (			):







				"""simple docstring"""






				with offline(OfflineSimulationMode.HF_DATASETS_OFFLINE_SET_TO_1			):
								with pytest.raises(snake_case			):
												http_head('''https://huggingface.co'''			)






