






import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin

class     _SCREAMING_SNAKE_CASE       (			unittest.TestCase		,   _a      ):





	def 						_A (		self				:					Union[str, Any]	):
		UpperCamelCase     :Union[str, Any]          =	load_tool("""text-classification"""	)
		self.tool.setup()
		UpperCamelCase     :str          =	load_tool("""text-classification""" ,  remote=__lowerCamelCase	)





	def 						_A (		self				:					Optional[Any]	):
		UpperCamelCase     :Optional[int]          =	self.tool("""That's quite cool""" ,  ["""positive""", """negative"""]	)
		self.assertEqual(__lowerCamelCase ,  """positive"""	)





	def 						_A (		self				:					List[str]	):
		UpperCamelCase     :int          =	self.remote_tool("""That's quite cool""" ,  ["""positive""", """negative"""]	)
		self.assertEqual(__lowerCamelCase ,  """positive"""	)





	def 						_A (		self				:					int	):
		UpperCamelCase     :str          =	self.tool(text="""That's quite cool""" ,  labels=["""positive""", """negative"""]	)
		self.assertEqual(__lowerCamelCase ,  """positive"""	)





	def 						_A (		self				:					Dict	):
		UpperCamelCase     :Optional[int]          =	self.remote_tool(text="""That's quite cool""" ,  labels=["""positive""", """negative"""]	)
		self.assertEqual(__lowerCamelCase ,  """positive"""	)



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


_lowerCAmelCase					:			Tuple  				=			logging.get_logger(__name__)

_lowerCAmelCase					:			Union[str, Any]  				=			{"ctrl": "https://huggingface.co/ctrl/resolve/main/config.json"}






class 	__magic_name__    (			lowerCAmelCase_      ):
			SCREAMING_SNAKE_CASE							   =						'ctrl'
			SCREAMING_SNAKE_CASE							   =						['past_key_values']
			SCREAMING_SNAKE_CASE							   =						{
			    'max_position_embeddings': 'n_positions',
			    'hidden_size': 'n_embd',
			    'num_attention_heads': 'n_head',
			    'num_hidden_layers': 'n_layer',
			}





			def __init__(		self					,  __snake_case=24_6534					,  __snake_case=256					,  __snake_case=1280					,  __snake_case=8192					,  __snake_case=48					,  __snake_case=16					,  __snake_case=0.1					,  __snake_case=0.1					,  __snake_case=1e-6					,  __snake_case=0.02					,  __snake_case=True					,  **__snake_case					,  )   -> Union[str, Any]:




						'''simple docstring'''
						__a        =vocab_size
						__a        =n_positions
						__a        =n_embd
						__a        =n_layer
						__a        =n_head
						__a        =dff
						__a        =resid_pdrop
						__a        =embd_pdrop
						__a        =layer_norm_epsilon
						__a        =initializer_range

						__a        =use_cache

						super().__init__(**__snake_case					)






