





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


a__:      Optional[int]									=		logging.get_logger(__name__)

a__:      str									=		{
    """google/fnet-base""": """https://huggingface.co/google/fnet-base/resolve/main/config.json""",
    """google/fnet-large""": """https://huggingface.co/google/fnet-large/resolve/main/config.json"""
    # See all FNet models at https://huggingface.co/models?filter=fnet
}




class     SCREAMING_SNAKE_CASE__ (						__snake_case      ):
 __SCREAMING_SNAKE_CASE							       =	'fnet'



 def __init__(							self,__lowerCamelCase=3_2000,__lowerCamelCase=768,__lowerCamelCase=12,__lowerCamelCase=3072,__lowerCamelCase="gelu_new",__lowerCamelCase=0.1,__lowerCamelCase=512,__lowerCamelCase=4,__lowerCamelCase=0.02,__lowerCamelCase=1E-12,__lowerCamelCase=False,__lowerCamelCase=512,__lowerCamelCase=3,__lowerCamelCase=1,__lowerCamelCase=2,**__lowerCamelCase,):
        super().__init__(pad_token_id=A_,bos_token_id=A_,eos_token_id=A_,**A_ )

        A__											=						vocab_size
        A__											=						max_position_embeddings
        A__											=						hidden_size
        A__											=						num_hidden_layers
        A__											=						intermediate_size
        A__											=						hidden_act
        A__											=						hidden_dropout_prob
        A__											=						initializer_range
        A__											=						type_vocab_size
        A__											=						layer_norm_eps
        A__											=						use_tpu_fourier_optimizations
        A__											=						tpu_short_seq_length












import pytest
import requests

from datasets.utils.file_utils import http_head

from .utils import OfflineSimulationMode, RequestWouldHangIndefinitelyError, offline



@pytest.mark.integration
def 		A_				(     )						-> List[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 		A_				(     )						-> Tuple:
 with offline(OfflineSimulationMode.CONNECTION_FAILS     ):
  with pytest.raises(requests.exceptions.ConnectionError     ):
   requests.request("GET"							,   "https://huggingface.co"     )



def 		A_				(     )						-> Optional[int]:
 with offline(OfflineSimulationMode.HF_DATASETS_OFFLINE_SET_TO_1     ):
  with pytest.raises(_lowerCAmelCase     ):
   http_head("https://huggingface.co"     )
