



"""simple docstring"""







import logging

from transformers import PretrainedConfig


__snake_case						:					Optional[Any]	       =      logging.getLogger(__name__)


__snake_case						:					List[Any]	       =      {
    """bertabs-finetuned-cnndm""": """https://huggingface.co/remi/bertabs-finetuned-cnndm-extractive-abstractive-summarization/resolve/main/config.json""",
}

class    UpperCamelCase	(       __SCREAMING_SNAKE_CASE					):





     """simple docstring"""






     _lowerCamelCase       :			Tuple					 ="""bertabs"""





     def __init__(       self			:				Tuple						,   _lowerCamelCase			:				str=3_0_5_2_2						,   _lowerCamelCase			:				Dict=5_1_2						,   _lowerCamelCase			:				str=6						,   _lowerCamelCase			:				Optional[Any]=5_1_2						,   _lowerCamelCase			:				Dict=8						,   _lowerCamelCase			:				Union[str, Any]=5_1_2						,   _lowerCamelCase			:				List[Any]=0.2						,   _lowerCamelCase			:				Any=6						,   _lowerCamelCase			:				List[str]=7_6_8						,   _lowerCamelCase			:				List[str]=8						,   _lowerCamelCase			:				str=2_0_4_8						,   _lowerCamelCase			:				Tuple=0.2						,   **_lowerCamelCase			:				Tuple						,   ):
          super().__init__(**A_			)

          A__      						= vocab_size
          A__      						= max_pos

          A__      						= enc_layers
          A__      						= enc_hidden_size
          A__      						= enc_heads
          A__      						= enc_ff_size
          A__      						= enc_dropout

          A__      						= dec_layers
          A__      						= dec_hidden_size
          A__      						= dec_heads
          A__      						= dec_ff_size
          A__      						= dec_dropout










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'''	)
