


'''simple docstring'''






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

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




@dataclass(frozen=a__						)
class 	a__       (							a__						):





							'''simple docstring'''






							lowercase__    :     str					=   field(default="audio-classification"       ,       metadata={"include_in_asdict_even_if_is_default": True}						)
							lowercase__    :     ClassVar[Features]					=   Features({"audio": Audio()}						)
							lowercase__    :     ClassVar[Features]					=   Features({"labels": ClassLabel}						)
							lowercase__    :     str					=   "audio"
							lowercase__    :     str					=   "labels"







							def 						__SCREAMING_SNAKE_CASE							(	self      ,					lowerCamelCase_     ) ->							List[str]:
														if self.label_column not in features:
																					raise ValueError(F"""Column {self.label_column} is not present in features."""     )
														if not isinstance(features[self.label_column]      ,					lowerCamelCase_     ):
																					raise ValueError(F"""Column {self.label_column} is not a ClassLabel."""     )
														lowerCAmelCase__      =			copy.deepcopy(self     )
														lowerCAmelCase__      =			self.label_schema.copy()
														lowerCAmelCase__      =			features[self.label_column]
														lowerCAmelCase__      =			label_schema
														return task_template







							@property
							def 						__SCREAMING_SNAKE_CASE							(	self     ) ->							Dict[str, str]:
														return {
														    self.audio_column: "audio",
														    self.label_column: "labels",
														}



'''simple docstring'''






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


__UpperCAmelCase					       =							logging.get_logger(__name__)

__UpperCAmelCase					       =							{'''ctrl''': '''https://huggingface.co/ctrl/resolve/main/config.json'''}




class 	a__       (							a__						):





							'''simple docstring'''






							lowercase__    :     Dict					=   "ctrl"
							lowercase__    :     str					=   ["past_key_values"]
							lowercase__    :     Optional[int]					=   {
							    "max_position_embeddings": "n_positions",
							    "hidden_size": "n_embd",
							    "num_attention_heads": "n_head",
							    "num_hidden_layers": "n_layer",
							}







							def __init__(	self      ,					lowerCamelCase_=24_65_34      ,					lowerCamelCase_=2_56      ,					lowerCamelCase_=12_80      ,					lowerCamelCase_=81_92      ,					lowerCamelCase_=48      ,					lowerCamelCase_=16      ,					lowerCamelCase_=0.1      ,					lowerCamelCase_=0.1      ,					lowerCamelCase_=1e-6      ,					lowerCamelCase_=0.02      ,					lowerCamelCase_=True      ,					**lowerCamelCase_      ,					) ->							Union[str, Any]:
														lowerCAmelCase__      =			vocab_size
														lowerCAmelCase__      =			n_positions
														lowerCAmelCase__      =			n_embd
														lowerCAmelCase__      =			n_layer
														lowerCAmelCase__      =			n_head
														lowerCAmelCase__      =			dff
														lowerCAmelCase__      =			resid_pdrop
														lowerCAmelCase__      =			embd_pdrop
														lowerCAmelCase__      =			layer_norm_epsilon
														lowerCAmelCase__      =			initializer_range

														lowerCAmelCase__      =			use_cache

														super().__init__(**lowerCamelCase_     )