






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


_a      	=  logging.get_logger(__name__)

_a      	=  {
    '''SCUT-DLVCLab/lilt-roberta-en-base''': (
        '''https://huggingface.co/SCUT-DLVCLab/lilt-roberta-en-base/resolve/main/config.json'''
    ),
}





class __lowerCamelCase (      snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=      "lilt"

	def __init__(							self       ,    UpperCAmelCase=3_0522       ,    UpperCAmelCase=768       ,    UpperCAmelCase=12       ,    UpperCAmelCase=12       ,    UpperCAmelCase=3072       ,    UpperCAmelCase="gelu"       ,    UpperCAmelCase=0.1       ,    UpperCAmelCase=0.1       ,    UpperCAmelCase=512       ,    UpperCAmelCase=2       ,    UpperCAmelCase=0.02       ,    UpperCAmelCase=1e-12       ,    UpperCAmelCase=0       ,    UpperCAmelCase="absolute"       ,    UpperCAmelCase=None       ,    UpperCAmelCase=4       ,    UpperCAmelCase=1024       ,    **UpperCAmelCase       ,    ):
							"""simple docstring"""







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

							_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									=			position_embedding_type
							_UpperCAmelCase									=			classifier_dropout
							_UpperCAmelCase									=			channel_shrink_ratio
							_UpperCAmelCase									=			max_ad_position_embeddings





'''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"""							)



