





import logging

from transformers.configuration_utils import PretrainedConfig


__UpperCAmelCase       :   Any				       =							logging.getLogger(__name__)







class     __snake_case       (							__lowerCamelCase			):





       '''simple docstring'''







       lowerCAmelCase__      		=     """masked_bert"""




       def __init__(  self :    int							,				A :    str=30_522							,				A :    Dict=768							,				A :    List[Any]=12							,				A :    Union[str, Any]=12							,				A :    Any=3_072							,				A :    Tuple="gelu"							,				A :    List[Any]=0.1							,				A :    Dict=0.1							,				A :    str=512							,				A :    Tuple=2							,				A :    Tuple=0.02							,				A :    str=1E-12							,				A :    List[str]=0							,				A :    Optional[int]="topK"							,				A :    str="constant"							,				A :    List[str]=0.0							,				**A :    Union[str, Any]							,				):
         super().__init__(pad_token_id=A							,				**A		)

         __snake_case:						Union[str, Any]   =						vocab_size
         __snake_case:						Optional[Any]   =						hidden_size
         __snake_case:						Tuple   =						num_hidden_layers
         __snake_case:						int   =						num_attention_heads
         __snake_case:						Any   =						hidden_act
         __snake_case:						List[str]   =						intermediate_size
         __snake_case:						Optional[Any]   =						hidden_dropout_prob
         __snake_case:						Any   =						attention_probs_dropout_prob
         __snake_case:						List[str]   =						max_position_embeddings
         __snake_case:						List[Any]   =						type_vocab_size
         __snake_case:						Optional[Any]   =						initializer_range
         __snake_case:						Dict   =						layer_norm_eps
         __snake_case:						Dict   =						pruning_method
         __snake_case:						Tuple   =						mask_init
         __snake_case:						List[Any]   =						mask_scale













import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin







class     __snake_case       (							unittest.TestCase   ,			__lowerCamelCase			):





       '''simple docstring'''







       def 							UpperCAmelCase__ (  self :    Union[str, Any]		):
         __snake_case:						Optional[int]   =						load_tool("""text-classification"""		)
         self.tool.setup()
         __snake_case:						Dict   =						load_tool("""text-classification"""							,				remote=A		)




       def 							UpperCAmelCase__ (  self :    Optional[int]		):
         __snake_case:						List[str]   =						self.tool("""That's quite cool"""							,				["""positive""", """negative"""]		)
         self.assertEqual(A							,				"""positive"""		)




       def 							UpperCAmelCase__ (  self :    Dict		):
         __snake_case:						List[str]   =						self.remote_tool("""That's quite cool"""							,				["""positive""", """negative"""]		)
         self.assertEqual(A							,				"""positive"""		)




       def 							UpperCAmelCase__ (  self :    Optional[Any]		):
         __snake_case:						Optional[Any]   =						self.tool(text="""That's quite cool"""							,				labels=["""positive""", """negative"""]		)
         self.assertEqual(A							,				"""positive"""		)






       def 							UpperCAmelCase__ (  self :    Tuple		):
         __snake_case:						int   =						self.remote_tool(text="""That's quite cool"""							,				labels=["""positive""", """negative"""]		)
         self.assertEqual(A							,				"""positive"""		)






