





import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin

class     __SCREAMING_SNAKE_CASE   (       unittest.TestCase				,						_a    ):






							def 			_lowerCamelCase						(  self					):
														UpperCamelCase__			       =     load_tool("""text-classification"""					)
														self.tool.setup()
														UpperCamelCase__			       =     load_tool("""text-classification"""					,	remote=__lowerCAmelCase					)






							def 			_lowerCamelCase						(  self					):
														UpperCamelCase__			       =     self.tool("""That's quite cool"""					,	["""positive""", """negative"""]					)
														self.assertEqual(__lowerCAmelCase					,	"""positive"""					)






							def 			_lowerCamelCase						(  self					):
														UpperCamelCase__			       =     self.remote_tool("""That's quite cool"""					,	["""positive""", """negative"""]					)
														self.assertEqual(__lowerCAmelCase					,	"""positive"""					)






							def 			_lowerCamelCase						(  self					):
														UpperCamelCase__			       =     self.tool(text="""That's quite cool"""					,	labels=["""positive""", """negative"""]					)
														self.assertEqual(__lowerCAmelCase					,	"""positive"""					)







							def 			_lowerCamelCase						(  self					):
														UpperCamelCase__			       =     self.remote_tool(text="""That's quite cool"""					,	labels=["""positive""", """negative"""]					)
														self.assertEqual(__lowerCAmelCase					,	"""positive"""					)











import logging

from transformers.configuration_utils import PretrainedConfig


UpperCamelCase__     =	logging.getLogger(__name__)

class     __SCREAMING_SNAKE_CASE   (       _a    ):
							snake_case       : Optional[Any]         =    """masked_bert"""






							def __init__(  self					,	__lowerCAmelCase=30522					,	__lowerCAmelCase=768					,	__lowerCAmelCase=12					,	__lowerCAmelCase=12					,	__lowerCAmelCase=3072					,	__lowerCAmelCase="gelu"					,	__lowerCAmelCase=0.1					,	__lowerCAmelCase=0.1					,	__lowerCAmelCase=512					,	__lowerCAmelCase=2					,	__lowerCAmelCase=0.02					,	__lowerCAmelCase=1E-12					,	__lowerCAmelCase=0					,	__lowerCAmelCase="topK"					,	__lowerCAmelCase="constant"					,	__lowerCAmelCase=0.0					,	**__lowerCAmelCase					,	):
														super().__init__(pad_token_id=__lowerCAmelCase					,	**__lowerCAmelCase					)

														UpperCamelCase__			       =     vocab_size
														UpperCamelCase__			       =     hidden_size
														UpperCamelCase__			       =     num_hidden_layers
														UpperCamelCase__			       =     num_attention_heads
														UpperCamelCase__			       =     hidden_act
														UpperCamelCase__			       =     intermediate_size
														UpperCamelCase__			       =     hidden_dropout_prob
														UpperCamelCase__			       =     attention_probs_dropout_prob
														UpperCamelCase__			       =     max_position_embeddings
														UpperCamelCase__			       =     type_vocab_size
														UpperCamelCase__			       =     initializer_range
														UpperCamelCase__			       =     layer_norm_eps
														UpperCamelCase__			       =     pruning_method
														UpperCamelCase__			       =     mask_init
														UpperCamelCase__			       =     mask_scale




