






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


UpperCAmelCase_ :						Optional[int]      =      logging.get_logger(__name__)

UpperCAmelCase_ :						Optional[Any]      =      {'''ctrl''': '''https://huggingface.co/ctrl/resolve/main/config.json'''}

class     _SCREAMING_SNAKE_CASE       (			_a      ):
	snake_case__							:     Tuple     	=  """ctrl"""
	snake_case__							:     Dict     	=  ["""past_key_values"""]
	snake_case__							:     Tuple     	=  {
	    """max_position_embeddings""": """n_positions""",
	    """hidden_size""": """n_embd""",
	    """num_attention_heads""": """n_head""",
	    """num_hidden_layers""": """n_layer""",
	}





	def __init__(		self				:					Optional[Any] ,  __lowerCamelCase				:					Any=246_534 ,  __lowerCamelCase				:					Optional[int]=256 ,  __lowerCamelCase				:					str=1_280 ,  __lowerCamelCase				:					int=8_192 ,  __lowerCamelCase				:					List[str]=48 ,  __lowerCamelCase				:					Union[str, Any]=16 ,  __lowerCamelCase				:					Tuple=0.1 ,  __lowerCamelCase				:					Optional[int]=0.1 ,  __lowerCamelCase				:					List[str]=1E-6 ,  __lowerCamelCase				:					Tuple=0.02 ,  __lowerCamelCase				:					Tuple=True ,  **__lowerCamelCase				:					Union[str, Any] ,  ):
		UpperCamelCase     :int          =	vocab_size
		UpperCamelCase     :Tuple          =	n_positions
		UpperCamelCase     :Tuple          =	n_embd
		UpperCamelCase     :str          =	n_layer
		UpperCamelCase     :Dict          =	n_head
		UpperCamelCase     :Optional[Any]          =	dff
		UpperCamelCase     :Optional[int]          =	resid_pdrop
		UpperCamelCase     :List[str]          =	embd_pdrop
		UpperCamelCase     :Tuple          =	layer_norm_epsilon
		UpperCamelCase     :List[Any]          =	initializer_range

		UpperCamelCase     :Any          =	use_cache

		super().__init__(**__lowerCamelCase	)








import copy
from dataclasses import dataclass, field
from typing import ClassVar, Dict

from ..features import Audio, Features, Value
from .base import TaskTemplate

@dataclass(frozen=_a      )
class     _SCREAMING_SNAKE_CASE       (			_a      ):
	snake_case__							:     str     	=  field(default="""automatic-speech-recognition"""		,   metadata={"""include_in_asdict_even_if_is_default""": True}      )
	snake_case__							:     ClassVar[Features]     	=  Features({"""audio""": Audio()}      )
	snake_case__							:     ClassVar[Features]     	=  Features({"""transcription""": Value("""string"""      )}      )
	snake_case__							:     str     	=  "audio"
	snake_case__							:     str     	=  "transcription"





	def 						_A (		self				:					List[str] ,  __lowerCamelCase				:					Dict	):
		if self.audio_column not in features:
			raise ValueError(F"""Column {self.audio_column} is not present in features."""	)
		if not isinstance(features[self.audio_column] ,  __lowerCamelCase	):
			raise ValueError(F"""Column {self.audio_column} is not an Audio type."""	)
		UpperCamelCase     :int          =	copy.deepcopy(self	)
		UpperCamelCase     :Any          =	self.input_schema.copy()
		UpperCamelCase     :List[str]          =	features[self.audio_column]
		UpperCamelCase     :List[Any]          =	input_schema
		return task_template





	@property
	def 						_A (		self				:					Optional[int]	):
		return {self.audio_column: "audio", self.transcription_column: "transcription"}
