





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


_lowerCAmelCase							:					Optional[Any]		    =		logging.get_logger(__name__)

_lowerCAmelCase							:					int		    =		{
    """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     __magic_name__     (							_lowerCamelCase							):





     """simple docstring"""



     __UpperCamelCase    			=   '''fnet'''



     def __init__(							self				:Any	,					snake_case				:List[Any]=32_000	,					snake_case				:Tuple=768	,					snake_case				:Union[str, Any]=12	,					snake_case				:Optional[Any]=3_072	,					snake_case				:Any="gelu_new"	,					snake_case				:Optional[int]=0.1	,					snake_case				:Union[str, Any]=512	,					snake_case				:Optional[Any]=4	,					snake_case				:List[str]=0.02	,					snake_case				:Optional[int]=1e-12	,					snake_case				:List[str]=False	,					snake_case				:str=512	,					snake_case				:Tuple=3	,					snake_case				:List[Any]=1	,					snake_case				:str=2	,					**snake_case				:Optional[int]	,					):





        '''simple docstring'''




        super().__init__(pad_token_id=a_	,					bos_token_id=a_	,					eos_token_id=a_	,					**a_     )

        A_    : Dict								=	vocab_size
        A_    : Dict								=	max_position_embeddings
        A_    : Union[str, Any]								=	hidden_size
        A_    : Union[str, Any]								=	num_hidden_layers
        A_    : Tuple								=	intermediate_size
        A_    : Optional[Any]								=	hidden_act
        A_    : List[Any]								=	hidden_dropout_prob
        A_    : List[Any]								=	initializer_range
        A_    : int								=	type_vocab_size
        A_    : List[str]								=	layer_norm_eps
        A_    : int								=	use_tpu_fourier_optimizations
        A_    : str								=	tpu_short_seq_length





'''simple docstring'''






import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin



class 							lowercase       (  unittest.TestCase					,					_lowerCamelCase				):


 """simple docstring"""


 def _snake_case (							self							)		->   Any:
        _UpperCAmelCase  :						int			     = load_tool("""text-classification"""							)
        self.tool.setup()
        _UpperCAmelCase  :						Tuple			     = load_tool("""text-classification"""  ,remote=a_							)







 def _snake_case (							self							)		->   Union[str, Any]:
        _UpperCAmelCase  :						Tuple			     = self.tool("""That's quite cool"""  ,["""positive""", """negative"""]							)
        self.assertEqual(a_  ,"""positive"""							)







 def _snake_case (							self							)		->   Any:
        _UpperCAmelCase  :						Dict			     = self.remote_tool("""That's quite cool"""  ,["""positive""", """negative"""]							)
        self.assertEqual(a_  ,"""positive"""							)







 def _snake_case (							self							)		->   str:
        _UpperCAmelCase  :						List[Any]			     = self.tool(text="""That's quite cool"""  ,labels=["""positive""", """negative"""]							)
        self.assertEqual(a_  ,"""positive"""							)







 def _snake_case (							self							)		->   Union[str, Any]:
        _UpperCAmelCase  :						Any			     = self.remote_tool(text="""That's quite cool"""  ,labels=["""positive""", """negative"""]							)
        self.assertEqual(a_  ,"""positive"""							)



