

"""simple docstring"""






import sys

from .dependency_versions_table import deps
from .utils.versions import require_version, require_version_core


# define which module versions we always want to check at run time
# (usually the ones defined in `install_requires` in setup.py)
#
# order specific notes:
# - tqdm must be checked before tokenizers

__lowerCamelCase										=		"python tqdm regex requests packaging filelock numpy tokenizers".split()
if sys.version_info < (3, 7):
 pkgs_to_check_at_runtime.append("dataclasses")
if sys.version_info < (3, 8):
 pkgs_to_check_at_runtime.append("importlib_metadata")

for pkg in pkgs_to_check_at_runtime:
 if pkg in deps:
  if pkg == "tokenizers":
   # must be loaded here, or else tqdm check may fail
   from .utils import is_tokenizers_available

   if not is_tokenizers_available():
    continue  # not required, check version only if installed

  require_version_core(deps[pkg])
 else:
  raise ValueError(f"""can't find {pkg} in {deps.keys()}, check dependency_versions_table.py""")





def 	lowercase      (   __UpperCamelCase      ,   __UpperCamelCase=None						) ->      str:
 require_version(deps[pkg]      ,   __UpperCamelCase						)




"""simple docstring"""






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


__lowerCamelCase										=		logging.get_logger(__name__)

__lowerCamelCase										=		{
    "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        _lowercase					(     __UpperCAmelCase     ):
     _lowerCamelCase     =       '''fnet'''







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

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

