





"""simple docstring"""






import logging

from transformers.configuration_utils import PretrainedConfig


__UpperCAmelCase						=			logging.getLogger(__name__)



class 					__UpperCAmelCase							(						_UpperCamelCase  ):
				__lowerCamelCase				:	List[str]				     =				"masked_bert"
				def __init__(		self    :			Tuple	, a_    :			List[Any]=3_05_22	, a_    :			Union[str, Any]=7_68	, a_    :			Any=12	, a_    :			Optional[int]=12	, a_    :			Optional[int]=30_72	, a_    :			Dict="gelu"	, a_    :			Union[str, Any]=0.1	, a_    :			Optional[int]=0.1	, a_    :			List[str]=5_12	, a_    :			List[str]=2	, a_    :			Optional[int]=0.02	, a_    :			str=1E-12	, a_    :			Dict=0	, a_    :			Union[str, Any]="topK"	, a_    :			Optional[int]="constant"	, a_    :			Any=0.0	, **a_    :			str	, )	->	Optional[int]:



							'''simple docstring'''



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

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






"""simple docstring"""






import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin



class 					__UpperCAmelCase							(						unittest.TestCase						,  _UpperCamelCase  ):
				def       UpperCAmelCase      (		self    :			Dict    )	->	List[Any]:



							'''simple docstring'''



							a__  :	Any		 =			load_tool("text-classification"    )
							self.tool.setup()
							a__  :	List[Any]		 =			load_tool("text-classification"	, remote=a_    )
				def       UpperCAmelCase      (		self    :			Optional[int]    )	->	Optional[Any]:



							'''simple docstring'''



							a__  :	str		 =			self.tool("That's quite cool"	, ["positive", "negative"]    )
							self.assertEqual(a_	, "positive"    )
				def       UpperCAmelCase      (		self    :			Union[str, Any]    )	->	Optional[int]:



							'''simple docstring'''



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



							'''simple docstring'''



							a__  :	List[str]		 =			self.tool(text="That's quite cool"	, labels=["positive", "negative"]    )
							self.assertEqual(a_	, "positive"    )






				def       UpperCAmelCase      (		self    :			List[Any]    )	->	List[Any]:



							'''simple docstring'''



							a__  :	Tuple		 =			self.remote_tool(text="That's quite cool"	, labels=["positive", "negative"]    )
							self.assertEqual(a_	, "positive"    )