
'''simple docstring'''



from collections import OrderedDict
from typing import Mapping

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


UpperCamelCase__      :		List[Any]       							=  logging.get_logger(__name__)

UpperCamelCase__      :		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    _a				(_lowerCamelCase):





       """simple docstring"""




       SCREAMING_SNAKE_CASE      =  'big_bird'






       def __init__(							self       ,							A__=5_03_58       ,							A__=7_68       ,							A__=12       ,							A__=12       ,							A__=30_72       ,							A__="gelu_new"       ,							A__=0.1       ,							A__=0.1       ,							A__=40_96       ,							A__=2       ,							A__=0.02       ,							A__=1E-12       ,							A__=True       ,							A__=0       ,							A__=1       ,							A__=2       ,							A__=66       ,							A__="block_sparse"       ,							A__=True       ,							A__=False       ,							A__=64       ,							A__=3       ,							A__=None       ,							**A__       ,							)    ->			Dict:
          super().__init__(
              pad_token_id=A__       ,							bos_token_id=A__       ,							eos_token_id=A__       ,							sep_token_id=A__       ,							**A__       ,							)

          _SCREAMING_SNAKE_CASE      =				vocab_size
          _SCREAMING_SNAKE_CASE      =				max_position_embeddings
          _SCREAMING_SNAKE_CASE      =				hidden_size
          _SCREAMING_SNAKE_CASE      =				num_hidden_layers
          _SCREAMING_SNAKE_CASE      =				num_attention_heads
          _SCREAMING_SNAKE_CASE      =				intermediate_size
          _SCREAMING_SNAKE_CASE      =				hidden_act
          _SCREAMING_SNAKE_CASE      =				hidden_dropout_prob
          _SCREAMING_SNAKE_CASE      =				attention_probs_dropout_prob
          _SCREAMING_SNAKE_CASE      =				initializer_range
          _SCREAMING_SNAKE_CASE      =				type_vocab_size
          _SCREAMING_SNAKE_CASE      =				layer_norm_eps
          _SCREAMING_SNAKE_CASE      =				use_cache

          _SCREAMING_SNAKE_CASE      =				rescale_embeddings
          _SCREAMING_SNAKE_CASE      =				attention_type
          _SCREAMING_SNAKE_CASE      =				use_bias
          _SCREAMING_SNAKE_CASE      =				block_size
          _SCREAMING_SNAKE_CASE      =				num_random_blocks
          _SCREAMING_SNAKE_CASE      =				classifier_dropout






class    _a				(_lowerCamelCase):





       """simple docstring"""




       @property
       def        UpperCamelCase				(							self      )    ->			Mapping[str, Mapping[int, str]]:
          if self.task == "multiple-choice":
             _SCREAMING_SNAKE_CASE      =				{0: """batch""", 1: """choice""", 2: """sequence"""}
          else:
             _SCREAMING_SNAKE_CASE      =				{0: """batch""", 1: """sequence"""}
          return OrderedDict(
              [
                  ("""input_ids""", dynamic_axis),
                  ("""attention_mask""", dynamic_axis),
              ]      )








'''simple docstring'''



import pytest
import requests

from datasets.utils.file_utils import http_head

from .utils import OfflineSimulationMode, RequestWouldHangIndefinitelyError, offline
@pytest.mark.integration
def    lowerCAmelCase_	(				)     ->     List[Any]:




   """simple docstring"""
   with offline(OfflineSimulationMode.CONNECTION_TIMES_OUT						):
      with pytest.raises(SCREAMING_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    lowerCAmelCase_	(				)     ->     int:




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







def    lowerCAmelCase_	(				)     ->     Optional[Any]:




   """simple docstring"""
   with offline(OfflineSimulationMode.HF_DATASETS_OFFLINE_SET_TO_1						):
      with pytest.raises(SCREAMING_SNAKE_CASE_						):
         http_head("""https://huggingface.co"""						)






